home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 June: Reference Library / Dev.CD Jun 96 RL / Dev.CD Jun 96 RL.toast / Technical Documentation / develop / develop Issue 9 / develop Issue 9 code / Tracks.sea / Tracks / DriverGlue.a < prev    next >
MacBinary  |  1992-11-16  |  15.4 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert System V 64-bit library (executable/systemV64BitLibrary) ext Unsupported
1% dexvert COFF Library (other/coffLibrary) ext Unsupported
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Nov 16 16:42:01 1992, modified Mon Nov 16 16:42:01 1992, creator 'MPS ', type ASCII, 15049 bytes "DriverGlue.a" , at 0x3b49 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 44 72 69 76 65 72 | 47 6c 75 65 2e 61 00 00 |..Driver|Glue.a..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 3a c9 00 | 00 01 ac a7 2d c6 29 a7 |.....:..|....-.).|
|00000060| 2d c6 29 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |-.).....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 64 79 00 00 |........|....dy..|
|00000080| 09 09 09 09 49 4d 50 4f | 52 54 20 09 09 54 50 72 |....IMPO|RT ..TPr|
|00000090| 69 6d 65 09 09 09 0d 09 | 09 09 09 49 4d 50 4f 52 |ime.....|...IMPOR|
|000000a0| 54 20 09 09 54 4f 70 65 | 6e 0d 09 09 09 09 49 4d |T ..TOpe|n.....IM|
|000000b0| 50 4f 52 54 20 09 09 54 | 43 6f 6e 74 72 6f 6c 09 |PORT ..T|Control.|
|000000c0| 09 09 0d 09 09 09 09 49 | 4d 50 4f 52 54 20 09 09 |.......I|MPORT ..|
|000000d0| 54 53 74 61 74 75 73 09 | 09 09 0d 09 09 09 09 49 |TStatus.|.......I|
|000000e0| 4d 50 4f 52 54 20 09 09 | 54 43 6c 6f 73 65 09 0d |MPORT ..|TClose..|
|000000f0| 0d 2a 20 46 72 6f 6d 20 | 53 79 73 45 71 75 2e 61 |.* From |SysEqu.a|
|00000100| 20 77 65 20 67 65 74 20 | 6a 49 4f 44 6f 6e 65 20 | we get |jIODone |
|00000110| 64 65 66 69 6e 65 64 2e | 0d 2a 20 46 72 6f 6d 20 |defined.|.* From |
|00000120| 54 72 61 70 73 2e 61 20 | 77 65 20 67 65 74 20 5f |Traps.a |we get _|
|00000130| 44 65 62 75 67 67 65 72 | 20 64 65 66 69 6e 65 64 |Debugger| defined|
|00000140| 2e 0d 2a 20 46 72 6f 6d | 20 44 72 69 76 65 72 47 |..* From| DriverG|
|00000150| 6c 75 65 2e 69 6e 63 6c | 2e 61 20 77 65 20 67 65 |lue.incl|.a we ge|
|00000160| 74 20 74 68 65 20 44 62 | 67 49 6e 66 6f 20 6d 61 |t the Db|gInfo ma|
|00000170| 63 72 6f 20 64 65 66 69 | 6e 65 64 2e 20 20 49 74 |cro defi|ned. It|
|00000180| 20 77 61 73 20 6a 75 73 | 74 20 74 61 6b 65 6e 20 | was jus|t taken |
|00000190| 66 72 6f 6d 0d 2a 20 53 | 61 6d 70 6c 65 2e 61 20 |from.* S|ample.a |
|000001a0| 61 6e 64 20 61 6c 6c 20 | 74 68 65 20 6f 74 68 65 |and all |the othe|
|000001b0| 72 20 6d 61 63 72 6f 73 | 20 77 65 72 65 20 64 65 |r macros| were de|
|000001c0| 6c 65 74 65 64 2e 0d 09 | 09 09 09 50 52 49 4e 54 |leted...|...PRINT|
|000001d0| 09 50 55 53 48 2c 4f 46 | 46 09 09 09 09 09 09 09 |.PUSH,OF|F.......|
|000001e0| 09 09 3b 20 64 6f 6e 27 | 74 20 70 72 69 6e 74 20 |..; don'|t print |
|000001f0| 61 6e 79 20 6f 66 20 74 | 68 69 73 20 73 74 75 66 |any of t|his stuf|
|00000200| 66 09 09 0d 09 09 09 09 | 49 4e 43 4c 55 44 45 09 |f.......|INCLUDE.|
|00000210| 27 53 79 73 45 71 75 2e | 61 27 0d 09 09 09 09 49 |'SysEqu.|a'.....I|
|00000220| 4e 43 4c 55 44 45 09 27 | 54 72 61 70 73 2e 61 27 |NCLUDE.'|Traps.a'|
|00000230| 09 0d 09 09 09 09 49 4e | 43 4c 55 44 45 09 27 44 |......IN|CLUDE.'D|
|00000240| 72 69 76 65 72 47 6c 75 | 65 2e 69 6e 63 6c 2e 61 |riverGlu|e.incl.a|
|00000250| 27 09 09 09 09 3b 20 61 | 6c 6c 20 6f 75 72 20 6d |'....; a|ll our m|
|00000260| 61 63 72 6f 73 20 61 6e | 64 20 64 61 74 61 20 74 |acros an|d data t|
|00000270| 65 6d 70 6c 61 74 65 73 | 0d 09 09 09 09 50 52 49 |emplates|.....PRI|
|00000280| 4e 54 09 50 4f 50 09 09 | 09 09 09 09 09 09 09 09 |NT.POP..|........|
|00000290| 3b 20 72 65 73 74 6f 72 | 65 20 74 68 65 20 50 52 |; restor|e the PR|
|000002a0| 49 4e 54 20 6f 70 74 69 | 6f 6e 73 0d 0d 2a 2a 2a |INT opti|ons..***|
|000002b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002d0| 20 4d 61 69 6e 20 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | Main **|********|
|000002e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000300| 2a 2a 0d 2a 20 57 65 20 | 68 61 76 65 20 74 6f 20 |**.* We |have to |
|00000310| 6d 61 6b 65 20 74 68 69 | 73 20 74 68 65 20 66 69 |make thi|s the fi|
|00000320| 72 73 74 20 65 6e 74 72 | 79 20 70 6f 69 6e 74 20 |rst entr|y point |
|00000330| 69 6e 20 6f 75 72 20 61 | 70 70 6c 69 63 61 74 69 |in our a|pplicati|
|00000340| 6f 6e 20 62 65 63 61 75 | 73 65 20 74 68 65 20 44 |on becau|se the D|
|00000350| 52 56 52 20 20 20 09 2a | 0d 2a 20 68 65 61 64 65 |RVR .*|.* heade|
|00000360| 72 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 6d 75 |r inform|ation mu|
|00000370| 73 74 20 63 6f 6d 65 20 | 66 69 72 73 74 2e 20 20 |st come |first. |
|00000380| 53 6f 2c 20 77 65 20 6a | 75 73 74 20 70 75 74 20 |So, we j|ust put |
|00000390| 6f 75 72 20 64 61 74 61 | 20 64 65 66 69 6e 65 73 |our data| defines|
|000003a0| 20 69 6e 73 69 64 65 20 | 74 68 65 20 09 2a 0d 2a | inside |the .*.*|
|000003b0| 20 22 4d 41 49 4e 22 20 | 70 72 6f 63 65 64 75 72 | "MAIN" |procedur|
|000003c0| 65 20 61 6e 64 20 74 68 | 65 6e 20 64 65 63 6c 61 |e and th|en decla|
|000003d0| 72 65 20 74 68 61 74 20 | 61 73 20 6f 75 72 20 65 |re that |as our e|
|000003e0| 6e 74 72 79 20 70 6f 69 | 6e 74 20 66 6f 72 20 4d |ntry poi|nt for M|
|000003f0| 72 2e 20 4c 69 6e 6b 65 | 72 2e 09 09 09 2a 0d 2a |r. Linke|r....*.*|
|00000400| 20 54 68 65 20 62 69 74 | 73 20 69 6e 20 74 68 65 | The bit|s in the|
|00000410| 20 48 49 47 48 20 62 79 | 74 65 20 28 62 65 77 61 | HIGH by|te (bewa|
|00000420| 72 65 20 6f 66 20 74 68 | 69 73 20 2d 2d 20 69 74 |re of th|is -- it|
|00000430| 20 62 69 74 20 6d 65 20 | 74 68 65 20 66 69 72 73 | bit me |the firs|
|00000440| 74 20 67 6f 2d 61 72 6f | 75 6e 64 20 62 65 63 61 |t go-aro|und beca|
|00000450| 75 73 65 2a 0d 2a 20 49 | 20 66 6f 72 67 6f 74 20 |use*.* I| forgot |
|00000460| 74 6f 20 70 75 74 20 74 | 68 65 6d 20 69 6e 20 74 |to put t|hem in t|
|00000470| 68 65 20 48 49 47 48 20 | 62 79 74 65 29 2c 20 61 |he HIGH |byte), a|
|00000480| 72 65 20 64 65 66 69 6e | 65 64 20 66 6f 72 20 74 |re defin|ed for t|
|00000490| 68 69 73 20 44 52 56 52 | 20 61 73 20 66 6f 6c 6c |his DRVR| as foll|
|000004a0| 6f 77 73 3a 20 20 20 20 | 20 2a 0d 2a 20 42 69 74 |ows: | *.* Bit|
|000004b0| 20 37 20 28 6d 6f 73 74 | 20 73 69 67 6e 69 66 69 | 7 (most| signifi|
|000004c0| 63 61 6e 74 20 62 69 74 | 29 09 09 55 6e 64 65 66 |cant bit|)..Undef|
|000004d0| 69 6e 65 64 09 09 46 61 | 6c 73 65 20 28 30 29 09 |ined..Fa|lse (0).|
|000004e0| 09 09 09 09 09 09 09 2a | 0d 2a 20 42 69 74 20 36 |.......*|.* Bit 6|
|000004f0| 20 09 09 09 09 09 09 09 | 09 09 09 64 4e 65 65 64 | .......|...dNeed|
|00000500| 4c 6f 63 6b 09 09 54 72 | 75 65 20 28 31 29 09 09 |Lock..Tr|ue (1)..|
|00000510| 09 09 09 09 09 09 09 2a | 0d 2a 20 42 69 74 20 35 |.......*|.* Bit 5|
|00000520| 20 09 09 09 09 09 09 09 | 09 09 09 64 4e 65 65 64 | .......|...dNeed|
|00000530| 54 69 6d 65 09 09 46 61 | 6c 73 65 20 28 31 29 09 |Time..Fa|lse (1).|
|00000540| 09 09 09 09 09 09 09 2a | 0d 2a 20 42 69 74 20 34 |.......*|.* Bit 4|
|00000550| 20 09 09 09 09 09 09 09 | 09 09 09 64 4e 65 65 64 | .......|...dNeed|
|00000560| 47 6f 6f 64 42 79 65 09 | 54 72 75 65 20 28 31 29 |GoodBye.|True (1)|
|00000570| 09 09 09 09 09 09 09 09 | 09 2a 0d 2a 20 42 69 74 |........|.*.* Bit|
|00000580| 20 33 20 09 09 09 09 09 | 09 09 09 09 09 64 53 74 | 3 .....|.....dSt|
|00000590| 61 74 45 6e 61 62 6c 65 | 09 09 54 72 75 65 20 28 |atEnable|..True (|
|000005a0| 31 29 09 09 09 09 09 09 | 09 09 09 2a 0d 2a 20 42 |1)......|...*.* B|
|000005b0| 69 74 20 32 20 09 09 09 | 09 09 09 09 09 09 09 64 |it 2 ...|.......d|
|000005c0| 43 74 6c 45 6e 61 62 6c | 65 09 09 54 72 75 65 20 |CtlEnabl|e..True |
|000005d0| 28 31 29 09 09 09 09 09 | 09 09 09 09 2a 0d 2a 20 |(1).....|....*.* |
|000005e0| 42 69 74 20 31 20 09 09 | 09 09 09 09 09 09 09 09 |Bit 1 ..|........|
|000005f0| 64 57 72 69 74 45 6e 61 | 62 6c 65 09 09 54 72 75 |dWritEna|ble..Tru|
|00000600| 65 20 28 30 29 09 09 09 | 09 09 09 09 09 09 2a 0d |e (0)...|......*.|
|00000610| 2a 20 42 69 74 20 30 20 | 28 6c 65 61 73 74 20 73 |* Bit 0 |(least s|
|00000620| 69 67 6e 69 66 69 63 61 | 6e 74 20 62 69 74 29 20 |ignifica|nt bit) |
|00000630| 09 09 64 52 65 61 64 45 | 6e 61 62 6c 65 09 09 54 |..dReadE|nable..T|
|00000640| 72 75 65 20 28 30 29 09 | 09 09 09 09 09 09 09 09 |rue (0).|........|
|00000650| 2a 0d 2a 20 57 68 69 63 | 68 20 61 6c 6c 20 61 64 |*.* Whic|h all ad|
|00000660| 64 73 20 75 70 20 74 6f | 3a 20 24 37 43 2e 09 09 |ds up to|: $7C...|
|00000670| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00000680| 09 2a 0d 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.*.*****|********|
|00000690| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000006a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000006b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000006c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000006d0| 2a 2a 2a 2a 2a 2a 2a 2a | 0d 0d 48 45 41 44 45 52 |********|..HEADER|
|000006e0| 44 45 46 09 50 52 4f 43 | 09 09 09 45 58 50 4f 52 |DEF.PROC|...EXPOR|
|000006f0| 54 09 09 09 09 09 09 09 | 09 09 09 09 09 0d 09 09 |T.......|........|
|00000700| 09 09 49 4d 50 4f 52 54 | 20 09 09 54 53 45 50 72 |..IMPORT| ..TSEPr|
|00000710| 69 6d 65 09 09 09 0d 09 | 09 09 09 49 4d 50 4f 52 |ime.....|...IMPOR|
|00000720| 54 20 09 09 54 53 45 4f | 70 65 6e 0d 09 09 09 09 |T ..TSEO|pen.....|
|00000730| 49 4d 50 4f 52 54 20 09 | 09 54 53 45 43 6f 6e 74 |IMPORT .|.TSECont|
|00000740| 72 6f 6c 09 09 09 0d 09 | 09 09 09 49 4d 50 4f 52 |rol.....|...IMPOR|
|00000750| 54 20 09 09 54 53 45 53 | 74 61 74 75 73 09 09 09 |T ..TSES|tatus...|
|00000760| 0d 09 09 09 09 49 4d 50 | 4f 52 54 20 09 09 54 53 |.....IMP|ORT ..TS|
|00000770| 45 43 6c 6f 73 65 09 0d | 54 53 45 53 74 61 72 74 |EClose..|TSEStart|
|00000780| 48 64 72 09 44 43 2e 57 | 09 09 09 24 37 43 30 30 |Hdr.DC.W|...$7C00|
|00000790| 09 09 09 09 09 09 09 09 | 3b 20 54 75 72 6e 20 74 |........|; Turn t|
|000007a0| 68 65 20 70 72 6f 70 65 | 72 20 62 69 74 73 20 6f |he prope|r bits o|
|000007b0| 6e 0d 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |n.......|........|
|000007c0| 09 09 09 3b 20 64 4e 65 | 65 64 4c 6f 63 6b 3c 36 |...; dNe|edLock<6|
|000007d0| 3e 2c 20 64 4e 65 65 64 | 47 6f 6f 64 62 79 65 3c |>, dNeed|Goodbye<|
|000007e0| 34 29 0d 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |4)......|........|
|000007f0| 09 09 09 09 3b 20 64 52 | 65 61 64 45 6e 61 62 6c |....; dR|eadEnabl|
|00000800| 65 3c 33 3e 2c 20 64 57 | 72 69 74 45 6e 61 62 6c |e<3>, dW|ritEnabl|
|00000810| 65 3c 32 3e 0d 09 09 09 | 09 09 09 09 09 09 09 09 |e<2>....|........|
|00000820| 09 09 09 09 09 09 3b 20 | 64 43 74 6c 45 6e 61 62 |......; |dCtlEnab|
|00000830| 6c 65 3c 31 3e 2c 20 64 | 53 74 61 74 45 6e 61 62 |le<1>, d|StatEnab|
|00000840| 6c 65 3c 30 3e 0d 09 09 | 09 09 44 43 2e 57 09 09 |le<0>...|..DC.W..|
|00000850| 09 24 33 43 09 09 09 09 | 09 09 09 09 3b 20 36 30 |.$3C....|....; 60|
|00000860| 20 74 69 63 6b 73 20 64 | 65 6c 61 79 20 28 69 66 | ticks d|elay (if|
|00000870| 20 64 4e 65 65 64 54 69 | 6d 65 20 3d 20 54 72 75 | dNeedTi|me = Tru|
|00000880| 65 29 0d 09 09 09 09 44 | 43 2e 57 09 09 09 30 09 |e).....D|C.W...0.|
|00000890| 09 09 09 09 09 09 09 09 | 3b 20 44 52 56 52 45 4d |........|; DRVREM|
|000008a0| 61 73 6b 20 28 66 6f 72 | 20 44 41 73 20 6f 6e 6c |ask (for| DAs onl|
|000008b0| 79 29 0d 09 09 09 09 44 | 43 2e 57 09 09 09 30 09 |y).....D|C.W...0.|
|000008c0| 09 09 09 09 09 09 09 09 | 3b 20 44 52 56 52 4d 65 |........|; DRVRMe|
|000008d0| 6e 75 20 28 66 6f 72 20 | 44 41 73 20 6f 6e 6c 79 |nu (for |DAs only|
|000008e0| 29 0d 09 09 09 09 44 43 | 2e 57 09 09 09 54 53 45 |).....DC|.W...TSE|
|000008f0| 4f 70 65 6e 2d 54 53 45 | 53 74 61 72 74 48 64 72 |Open-TSE|StartHdr|
|00000900| 09 09 09 3b 20 4f 66 66 | 73 65 74 20 74 6f 20 6f |...; Off|set to o|
|00000910| 70 65 6e 20 72 6f 75 74 | 69 6e 65 0d 09 09 09 09 |pen rout|ine.....|
|00000920| 44 43 2e 57 09 09 09 54 | 53 45 50 72 69 6d 65 2d |DC.W...T|SEPrime-|
|00000930| 54 53 45 53 74 61 72 74 | 48 64 72 09 09 09 3b 20 |TSEStart|Hdr...; |
|00000940| 4f 66 66 73 65 74 20 74 | 6f 20 70 72 69 6d 65 20 |Offset t|o prime |
|00000950| 72 6f 75 74 69 6e 65 0d | 09 09 09 09 44 43 2e 57 |routine.|....DC.W|
|00000960| 09 09 09 54 53 45 43 6f | 6e 74 72 6f 6c 2d 54 53 |...TSECo|ntrol-TS|
|00000970| 45 53 74 61 72 74 48 64 | 72 09 09 3b 20 4f 66 66 |EStartHd|r..; Off|
|00000980| 73 65 74 20 74 6f 20 63 | 6f 6e 74 72 6f 6c 20 72 |set to c|ontrol r|
|00000990| 6f 75 74 69 6e 65 0d 09 | 09 09 09 44 43 2e 57 09 |outine..|...DC.W.|
|000009a0| 09 09 54 53 45 53 74 61 | 74 75 73 2d 54 53 45 53 |..TSESta|tus-TSES|
|000009b0| 74 61 72 74 48 64 72 09 | 09 3b 20 4f 66 66 73 65 |tartHdr.|.; Offse|
|000009c0| 74 20 74 6f 20 53 74 61 | 74 75 73 20 72 6f 75 74 |t to Sta|tus rout|
|000009d0| 69 6e 65 2e 0d 09 09 09 | 09 44 43 2e 57 09 09 09 |ine.....|.DC.W...|
|000009e0| 54 53 45 43 6c 6f 73 65 | 2d 54 53 45 53 74 61 72 |TSEClose|-TSEStar|
|000009f0| 74 48 64 72 09 09 09 3b | 20 4f 66 66 73 65 74 20 |tHdr...;| Offset |
|00000a00| 74 6f 20 43 6c 6f 73 65 | 20 72 6f 75 74 69 6e 65 |to Close| routine|
|00000a10| 2e 0d 09 09 09 09 44 43 | 2e 42 09 09 09 27 2e 54 |......DC|.B...'.T|
|00000a20| 52 41 43 45 27 09 09 09 | 09 09 09 09 3b 20 44 72 |RACE'...|....; Dr|
|00000a30| 69 76 65 72 20 6e 61 6d | 65 2e 0d 09 09 09 09 41 |iver nam|e......A|
|00000a40| 4c 49 47 4e 09 09 09 34 | 09 09 09 09 09 09 09 09 |LIGN...4|........|
|00000a50| 09 3b 20 41 6c 69 67 6e | 20 74 6f 20 6e 65 78 74 |.; Align| to next|
|00000a60| 20 6c 6f 6e 67 20 77 6f | 72 64 2e 0d 09 09 09 09 | long wo|rd......|
|00000a70| 45 4e 44 50 0d 0d 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ENDP..**|********|
|00000a80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000a90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 20 54 53 45 4f 70 65 |********|* TSEOpe|
|00000aa0| 6e 20 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |n ******|********|
|00000ab0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ac0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 0d 2a 20 54 |********|****.* T|
|00000ad0| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 28 61 6e 64 |his rout|ine (and|
|00000ae0| 20 61 6c 6c 20 6c 69 6b | 65 20 69 74 20 62 65 6c | all lik|e it bel|
|00000af0| 6f 77 29 20 70 65 72 66 | 6f 72 6d 73 20 74 68 72 |ow) perf|orms thr|
|00000b00| 65 65 20 62 61 73 69 63 | 20 66 75 6e 63 74 69 6f |ee basic| functio|
|00000b10| 6e 73 3a 20 09 09 09 09 | 09 2a 0d 2a 20 31 29 20 |ns: ....|.*.* 1) |
|00000b20| 70 75 73 68 69 6e 67 20 | 74 68 65 20 70 61 72 61 |pushing |the para|
|00000b30| 6d 65 74 65 72 20 62 6c | 6f 63 6b 20 28 41 30 29 |meter bl|ock (A0)|
|00000b40| 2c 20 61 6e 64 20 74 68 | 65 20 70 6f 69 6e 74 65 |, and th|e pointe|
|00000b50| 72 20 74 6f 20 74 68 65 | 20 44 43 45 20 28 41 31 |r to the| DCE (A1|
|00000b60| 29 20 6f 6e 20 74 68 65 | 20 73 74 61 63 6b 2e 2a |) on the| stack.*|
|00000b70| 0d 2a 20 32 29 20 54 65 | 73 74 69 6e 67 20 74 6f |.* 2) Te|sting to|
|00000b80| 20 73 65 65 20 77 68 65 | 74 68 65 72 20 74 68 65 | see whe|ther the|
|00000b90| 20 69 6d 6d 65 64 69 61 | 74 65 20 62 69 74 20 77 | immedia|te bit w|
|00000ba0| 61 73 20 73 65 74 20 69 | 6e 20 74 68 65 20 74 72 |as set i|n the tr|
|00000bb0| 61 70 20 77 6f 72 64 20 | 61 6e 64 20 52 54 53 69 |ap word |and RTSi|
|00000bc0| 6e 67 09 2a 0d 2a 20 33 | 29 20 54 65 73 74 69 6e |ng.*.* 3|) Testin|
|00000bd0| 67 20 74 68 65 20 72 65 | 73 75 6c 74 20 69 6e 20 |g the re|sult in |
|00000be0| 44 30 2e 20 20 49 66 20 | 69 74 27 73 20 31 20 74 |D0. If |it's 1 t|
|00000bf0| 68 65 20 6f 70 65 72 61 | 74 69 6f 6e 20 68 61 73 |he opera|tion has|
|00000c00| 6e 27 74 20 63 6f 6d 70 | 6c 65 74 65 64 20 79 65 |n't comp|leted ye|
|00000c10| 74 2c 20 73 6f 20 77 65 | 09 2a 0d 2a 20 20 20 20 |t, so we|.*.* |
|00000c20| 6a 75 73 74 20 77 61 6e | 74 20 74 6f 20 52 54 53 |just wan|t to RTS|
|00000c30| 2e 20 20 49 66 20 69 74 | 27 73 20 4e 4f 54 20 31 |. If it|'s NOT 1|
|00000c40| 2c 20 74 68 65 6e 20 77 | 65 27 6c 6c 20 6a 75 6d |, then w|e'll jum|
|00000c50| 70 20 74 68 72 6f 75 67 | 68 20 6a 49 4f 44 6f 6e |p throug|h jIODon|
|00000c60| 65 2e 09 09 09 09 09 2a | 0d 2a 20 49 20 70 75 74 |e......*|.* I put|
|00000c70| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 70 72 | the sta|ndard pr|
|00000c80| 6f 63 65 64 75 72 65 20 | 68 65 61 64 65 72 20 69 |ocedure |header i|
|00000c90| 6e 20 6a 75 73 74 20 73 | 6f 20 79 6f 75 27 64 20 |n just s|o you'd |
|00000ca0| 73 65 65 20 61 6e 6f 74 | 68 65 72 20 65 78 61 6d |see anot|her exam|
|00000cb0| 70 6c 65 20 6f 66 20 69 | 74 20 69 6e 09 2a 0d 2a |ple of i|t in.*.*|
|00000cc0| 20 75 73 65 2e 20 20 49 | 20 66 6f 75 6e 64 20 53 | use. I| found S|
|00000cd0| 61 6d 70 6c 65 2e 61 20 | 74 6f 20 62 65 20 6d 6f |ample.a |to be mo|
|00000ce0| 73 74 20 68 65 6c 70 66 | 75 6c 20 69 6e 20 6d 75 |st helpf|ul in mu|
|00000cf0| 63 68 20 6f 66 20 77 68 | 61 74 20 49 20 64 69 64 |ch of wh|at I did|
|00000d00| 20 68 65 72 65 2e 09 09 | 09 09 09 2a 0d 2a 2a 2a | here...|...*.***|
|00000d10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d60| 2a 2a 0d 54 53 45 4f 70 | 65 6e 09 09 50 52 4f 43 |**.TSEOp|en..PROC|
|00000d70| 09 09 09 45 58 50 4f 52 | 54 09 09 09 09 09 09 09 |...EXPOR|T.......|
|00000d80| 3b 20 61 6e 79 20 73 6f | 75 72 63 65 20 66 69 6c |; any so|urce fil|
|00000d90| 65 20 63 61 6e 20 75 73 | 65 20 74 68 69 73 20 72 |e can us|e this r|
|00000da0| 6f 75 74 69 6e 65 0d 0d | 53 74 61 63 6b 46 72 61 |outine..|StackFra|
|00000db0| 6d 65 09 52 45 43 4f 52 | 44 09 09 7b 41 36 4c 69 |me.RECOR|D..{A6Li|
|00000dc0| 6e 6b 7d 2c 44 45 43 52 | 09 09 09 09 09 3b 20 62 |nk},DECR|.....; b|
|00000dd0| 75 69 6c 64 20 61 20 73 | 74 61 63 6b 20 66 72 61 |uild a s|tack fra|
|00000de0| 6d 65 20 72 65 63 6f 72 | 64 0d 52 65 73 75 6c 74 |me recor|d.Result|
|00000df0| 31 09 09 44 53 2e 57 09 | 09 09 31 09 09 09 09 09 |1..DS.W.|..1.....|
|00000e00| 09 09 09 09 3b 20 66 75 | 6e 63 74 69 6f 6e 27 73 |....; fu|nction's|
|00000e10| 20 72 65 73 75 6c 74 20 | 72 65 74 75 72 6e 65 64 | result |returned|
|00000e20| 20 74 6f 20 63 61 6c 6c | 65 72 0d 50 61 72 61 6d | to call|er.Param|
|00000e30| 42 65 67 69 6e 09 45 51 | 55 09 09 09 2a 09 09 09 |Begin.EQ|U...*...|
|00000e40| 09 09 09 09 09 09 3b 20 | 73 74 61 72 74 20 70 61 |......; |start pa|
|00000e50| 72 61 6d 65 74 65 72 73 | 20 61 66 74 65 72 20 74 |rameters| after t|
|00000e60| 68 69 73 20 70 6f 69 6e | 74 0d 50 61 72 61 6d 53 |his poin|t.ParamS|
|00000e70| 69 7a 65 09 45 51 55 09 | 09 09 50 61 72 61 6d 42 |ize.EQU.|..ParamB|
|00000e80| 65 67 69 6e 2d 2a 09 09 | 09 09 09 3b 20 73 69 7a |egin-*..|...; siz|
|00000e90| 65 20 6f 66 20 61 6c 6c | 20 74 68 65 20 70 61 73 |e of all| the pas|
|00000ea0| 73 65 64 20 70 61 72 61 | 6d 65 74 65 72 73 0d 52 |sed para|meters.R|
|00000eb0| 65 74 41 64 64 72 20 09 | 09 44 53 2e 4c 09 09 09 |etAddr .|.DS.L...|
|00000ec0| 31 09 09 09 09 09 09 09 | 09 09 3b 20 70 6c 61 63 |1.......|..; plac|
|00000ed0| 65 20 68 6f 6c 64 65 72 | 20 66 6f 72 20 72 65 74 |e holder| for ret|
|00000ee0| 75 72 6e 20 61 64 64 72 | 65 73 73 0d 41 36 4c 69 |urn addr|ess.A6Li|
|00000ef0| 6e 6b 09 09 44 53 2e 4c | 09 09 09 31 09 09 09 09 |nk..DS.L|...1....|
|00000f00| 09 09 09 09 09 3b 20 70 | 6c 61 63 65 20 68 6f 6c |.....; p|lace hol|
|00000f10| 64 65 72 20 66 6f 72 20 | 41 36 20 6c 69 6e 6b 0d |der for |A6 link.|
|00000f20| 4c 6f 63 61 6c 53 69 7a | 65 09 45 51 55 20 09 09 |LocalSiz|e.EQU ..|
|00000f30| 09 2a 09 09 09 09 09 09 | 09 09 09 3b 20 73 69 7a |.*......|...; siz|
|00000f40| 65 20 6f 66 20 61 6c 6c | 20 74 68 65 20 6c 6f 63 |e of all| the loc|
|00000f50| 61 6c 20 76 61 72 69 61 | 62 6c 65 73 0d 09 09 09 |al varia|bles....|
|00000f60| 09 45 4e 44 52 0d 0d 09 | 09 09 09 57 49 54 48 09 |.ENDR...|...WITH.|
|00000f70| 09 09 53 74 61 63 6b 46 | 72 61 6d 65 09 09 09 09 |..StackF|rame....|
|00000f80| 09 09 3b 20 63 6f 76 65 | 72 20 6f 75 72 20 6c 6f |..; cove|r our lo|
|00000f90| 63 61 6c 20 73 74 61 63 | 6b 20 66 72 61 6d 65 0d |cal stac|k frame.|
|00000fa0| 09 09 09 09 4c 49 4e 4b | 09 09 09 41 36 2c 23 4c |....LINK|...A6,#L|
|00000fb0| 6f 63 61 6c 53 69 7a 65 | 09 09 09 09 09 3b 20 61 |ocalSize|.....; a|
|00000fc0| 6c 6c 6f 63 61 74 65 20 | 6f 75 72 20 6c 6f 63 61 |llocate |our loca|
|00000fd0| 6c 20 73 74 61 63 6b 20 | 66 72 61 6d 65 0d 09 09 |l stack |frame...|
|00000fe0| 09 09 0d 09 09 09 09 0d | 09 09 20 09 09 4d 4f 56 |........|.. ..MOV|
|00000ff0| 45 4d 2e 4c 20 09 09 44 | 31 2d 44 33 2f 41 30 2d |EM.L ..D|1-D3/A0-|
|00001000| 41 34 2c 2d 28 41 37 29 | 20 20 20 09 09 09 3b 53 |A4,-(A7)| ...;S|
|00001010| 61 76 65 20 72 65 67 69 | 73 74 65 72 73 20 28 56 |ave regi|sters (V|
|00001020| 31 2e 31 41 29 0d 09 09 | 09 09 4d 4f 56 45 2e 4c |1.1A)...|..MOVE.L|
|00001030| 09 09 41 31 2c 2d 28 41 | 37 29 09 09 09 09 09 09 |..A1,-(A|7)......|
|00001040| 09 3b 50 75 74 20 61 64 | 64 72 65 73 73 20 6f 66 |.;Put ad|dress of|
|00001050| 20 44 43 45 20 6f 6e 74 | 6f 20 73 74 61 63 6b 0d | DCE ont|o stack.|
|00001060| 09 09 09 09 4d 4f 56 45 | 2e 4c 09 09 41 30 2c 2d |....MOVE|.L..A0,-|
|00001070| 28 41 37 29 09 09 09 09 | 09 09 09 3b 50 75 74 20 |(A7)....|...;Put |
|00001080| 61 64 64 72 65 73 73 20 | 6f 66 20 50 61 72 61 6d |address |of Param|
|00001090| 42 6c 6f 63 6b 20 6f 6e | 74 6f 20 73 74 61 63 6b |Block on|to stack|
|000010a0| 0d 09 09 09 09 4a 53 52 | 20 09 09 09 54 4f 70 65 |.....JSR| ...TOpe|
|000010b0| 6e 09 09 09 09 09 09 3b | 43 61 6c 6c 20 6f 75 72 |n......;|Call our|
|000010c0| 20 72 6f 75 74 69 6e 65 | 2e 0d 09 09 09 09 41 44 | routine|......AD|
|000010d0| 44 51 2e 57 09 09 23 24 | 38 2c 41 37 09 09 09 09 |DQ.W..#$|8,A7....|
|000010e0| 09 09 09 3b 54 61 6b 65 | 20 6f 66 66 20 41 30 20 |...;Take| off A0 |
|000010f0| 61 6e 64 20 41 31 20 77 | 65 20 70 75 73 68 65 64 |and A1 w|e pushed|
|00001100| 2e 0d 09 09 09 09 41 44 | 44 41 2e 4c 09 09 23 50 |......AD|DA.L..#P|
|00001110| 61 72 61 6d 53 69 7a 65 | 2c 53 50 09 09 09 09 09 |aramSize|,SP.....|
|00001120| 3b 73 74 72 69 70 20 61 | 6c 6c 20 6f 66 20 74 68 |;strip a|ll of th|
|00001130| 65 20 63 61 6c 6c 65 72 | 27 73 20 70 61 72 61 6d |e caller|'s param|
|00001140| 65 74 65 72 73 0d 09 09 | 09 09 4d 4f 56 45 4d 2e |eters...|..MOVEM.|
|00001150| 4c 20 09 09 28 41 37 29 | 2b 2c 44 31 2d 44 33 2f |L ..(A7)|+,D1-D3/|
|00001160| 41 30 2d 41 34 20 20 20 | 20 09 09 3b 52 65 73 74 |A0-A4 | ..;Rest|
|00001170| 6f 72 65 20 72 65 67 69 | 73 74 65 72 73 20 28 56 |ore regi|sters (V|
|00001180| 31 2e 31 41 29 0d 09 09 | 09 09 53 57 41 50 09 09 |1.1A)...|..SWAP..|
|00001190| 09 44 30 09 09 09 09 09 | 09 09 09 09 3b 53 61 76 |.D0.....|....;Sav|
|000011a0| 65 20 72 65 73 75 6c 74 | 20 69 6e 20 4d 6f 73 74 |e result| in Most|
|000011b0| 53 69 67 20 57 6f 72 64 | 0d 09 09 09 09 4d 4f 56 |Sig Word|.....MOV|
|000011c0| 45 2e 57 09 09 69 6f 54 | 72 61 70 28 41 30 29 2c |E.W..ioT|rap(A0),|
|000011d0| 44 30 09 09 09 09 09 3b | 6d 6f 76 65 20 69 6f 54 |D0.....;|move ioT|
|000011e0| 72 61 70 20 69 6e 74 6f | 20 72 65 67 69 73 74 65 |rap into| registe|
|000011f0| 72 20 73 6f 20 77 65 20 | 63 61 6e 20 74 65 73 74 |r so we |can test|
|00001200| 0d 09 09 09 09 53 57 41 | 50 09 09 09 44 30 09 09 |.....SWA|P...D0..|
|00001210| 09 09 09 09 09 09 09 3b | 42 61 63 6b 20 61 67 61 |.......;|Back aga|
|00001220| 69 6e 0d 09 09 09 09 42 | 54 53 54 09 09 09 23 28 |in.....B|TST...#(|
|00001230| 6e 6f 51 75 65 75 65 42 | 69 74 2b 31 36 29 2c 20 |noQueueB|it+16), |
|00001240| 44 30 09 09 09 3b 54 65 | 73 74 20 74 68 65 20 62 |D0...;Te|st the b|
|00001250| 69 74 2e 0d 09 09 09 09 | 42 4e 45 2e 53 09 09 09 |it......|BNE.S...|
|00001260| 4f 70 65 6e 52 54 53 09 | 09 09 09 09 09 09 3b 49 |OpenRTS.|......;I|
|00001270| 66 20 5a 20 3d 20 30 2c | 20 74 68 65 6e 20 6e 6f |f Z = 0,| then no|
|00001280| 51 75 65 75 65 42 69 74 | 20 73 65 74 20 2d 2d 20 |QueueBit| set -- |
|00001290| 62 72 61 6e 63 68 0d 0d | 09 09 09 09 43 4d 50 2e |branch..|....CMP.|
|000012a0| 57 09 09 09 23 24 31 2c | 44 30 09 09 09 09 09 09 |W...#$1,|D0......|
|000012b0| 09 3b 43 6f 6d 70 61 72 | 65 20 72 65 73 75 6c 74 |.;Compar|e result|
|000012c0| 20 77 69 74 68 20 31 0d | 09 09 09 09 42 45 51 2e | with 1.|....BEQ.|
|000012d0| 53 09 09 09 4f 70 65 6e | 52 54 53 09 09 09 09 09 |S...Open|RTS.....|
|000012e0| 09 09 3b 4e 6f 74 20 65 | 71 75 61 6c 20 74 6f 20 |..;Not e|qual to |
|000012f0| 7a 65 72 6f 20 73 6f 20 | 52 54 53 2e 0d 09 09 09 |zero so |RTS.....|
|00001300| 09 55 4e 4c 4b 09 09 09 | 41 36 09 09 09 09 09 09 |.UNLK...|A6......|
|00001310| 09 09 09 3b 64 65 73 74 | 72 6f 79 20 74 68 65 20 |...;dest|roy the |
|00001320| 6c 69 6e 6b 0d 09 09 09 | 09 4d 4f 56 45 2e 4c 09 |link....|.MOVE.L.|
|00001330| 09 6a 49 4f 44 6f 6e 65 | 2c 2d 28 41 37 29 09 09 |.jIODone|,-(A7)..|
|00001340| 09 09 09 3b 50 75 74 20 | 6a 49 4f 44 6f 6e 65 20 |...;Put |jIODone |
|00001350| 6f 6e 20 74 68 65 20 73 | 74 61 63 6b 0d 09 09 09 |on the s|tack....|
|00001360| 09 52 54 53 09 09 09 09 | 09 09 09 09 09 09 09 09 |.RTS....|........|
|00001370| 3b 72 65 74 75 72 6e 20 | 74 6f 20 74 68 65 20 63 |;return |to the c|
|00001380| 61 6c 6c 65 72 0d 09 09 | 09 09 0d 4f 70 65 6e 52 |aller...|...OpenR|
|00001390| 54 53 09 09 55 4e 4c 4b | 09 09 09 41 36 09 09 09 |TS..UNLK|...A6...|
|000013a0| 09 09 09 09 09 09 3b 64 | 65 73 74 72 6f 79 20 74 |......;d|estroy t|
|000013b0| 68 65 20 6c 69 6e 6b 0d | 09 09 09 09 52 54 53 09 |he link.|....RTS.|
|000013c0| 09 09 09 09 09 09 09 09 | 09 09 09 3b 72 65 74 75 |........|...;retu|
|000013d0| 72 6e 20 74 6f 20 74 68 | 65 20 63 61 6c 6c 65 72 |rn to th|e caller|
|000013e0| 0d 09 09 09 09 44 62 67 | 49 6e 66 6f 09 09 54 53 |.....Dbg|Info..TS|
|000013f0| 45 4f 70 65 6e 09 09 09 | 09 09 09 09 3b 74 68 69 |EOpen...|....;thi|
|00001400| 73 20 6e 61 6d 65 20 77 | 69 6c 6c 20 61 70 70 65 |s name w|ill appe|
|00001410| 61 72 20 69 6e 20 74 68 | 65 20 64 65 62 75 67 67 |ar in th|e debugg|
|00001420| 65 72 0d 09 09 09 09 45 | 4e 44 50 0d 0d 0d 2a 2a |er.....E|NDP...**|
|00001430| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001440| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001450| 2a 20 54 53 45 50 72 69 | 6d 65 20 2a 2a 2a 2a 2a |* TSEPri|me *****|
|00001460| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001470| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001480| 2a 2a 2a 2a 0d 2a 20 54 | 68 69 73 20 72 6f 75 74 |****.* T|his rout|
|00001490| 69 6e 65 20 28 61 6e 64 | 20 61 6c 6c 20 6c 69 6b |ine (and| all lik|
|000014a0| 65 20 69 74 20 62 65 6c | 6f 77 29 20 70 65 72 66 |e it bel|ow) perf|
|000014b0| 6f 72 6d 73 20 74 68 72 | 65 65 20 62 61 73 69 63 |orms thr|ee basic|
|000014c0| 20 66 75 6e 63 74 69 6f | 6e 73 3a 20 09 09 09 09 | functio|ns: ....|
|000014d0| 09 2a 0d 2a 20 31 29 20 | 70 75 73 68 69 6e 67 20 |.*.* 1) |pushing |
|000014e0| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 20 62 6c |the para|meter bl|
|000014f0| 6f 63 6b 20 28 41 30 29 | 2c 20 61 6e 64 20 74 68 |ock (A0)|, and th|
|00001500| 65 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |e pointe|r to the|
|00001510| 20 44 43 45 20 28 41 31 | 29 20 6f 6e 20 74 68 65 | DCE (A1|) on the|
|00001520| 20 73 74 61 63 6b 2e 2a | 0d 2a 20 32 29 20 54 65 | stack.*|.* 2) Te|
|00001530| 73 74 69 6e 67 20 74 6f | 20 73 65 65 20 77 68 65 |sting to| see whe|
|00001540| 74 68 65 72 20 74 68 65 | 20 69 6d 6d 65 64 69 61 |ther the| immedia|
|00001550| 74 65 20 62 69 74 20 77 | 61 73 20 73 65 74 20 69 |te bit w|as set i|
|00001560| 6e 20 74 68 65 20 74 72 | 61 70 20 77 6f 72 64 20 |n the tr|ap word |
|00001570| 61 6e 64 20 52 54 53 69 | 6e 67 09 2a 0d 2a 20 33 |and RTSi|ng.*.* 3|
|00001580| 29 20 54 65 73 74 69 6e | 67 20 74 68 65 20 72 65 |) Testin|g the re|
|00001590| 73 75 6c 74 20 69 6e 20 | 44 30 2e 20 20 49 66 20 |sult in |D0. If |
|000015a0| 69 74 27 73 20 31 20 74 | 68 65 20 6f 70 65 72 61 |it's 1 t|he opera|
|000015b0| 74 69 6f 6e 20 68 61 73 | 6e 27 74 20 63 6f 6d 70 |tion has|n't comp|
|000015c0| 6c 65 74 65 64 20 79 65 | 74 2c 20 73 6f 20 77 65 |leted ye|t, so we|
|000015d0| 09 2a 0d 2a 20 20 20 20 | 6a 75 73 74 20 77 61 6e |.*.* |just wan|
|000015e0| 74 20 74 6f 20 52 54 53 | 2e 20 20 49 66 20 69 74 |t to RTS|. If it|
|000015f0| 27 73 20 4e 4f 54 20 31 | 2c 20 74 68 65 6e 20 77 |'s NOT 1|, then w|
|00001600| 65 27 6c 6c 20 6a 75 6d | 70 20 74 68 72 6f 75 67 |e'll jum|p throug|
|00001610| 68 20 6a 49 4f 44 6f 6e | 65 2e 09 09 09 09 09 2a |h jIODon|e......*|
|00001620| 0d 2a 20 49 20 70 75 74 | 20 74 68 65 20 73 74 61 |.* I put| the sta|
|00001630| 6e 64 61 72 64 20 70 72 | 6f 63 65 64 75 72 65 20 |ndard pr|ocedure |
|00001640| 68 65 61 64 65 72 20 69 | 6e 20 6a 75 73 74 20 73 |header i|n just s|
|00001650| 6f 20 79 6f 75 27 64 20 | 73 65 65 20 61 6e 6f 74 |o you'd |see anot|
|00001660| 68 65 72 20 65 78 61 6d | 70 6c 65 20 6f 66 20 69 |her exam|ple of i|
|00001670| 74 20 69 6e 09 2a 0d 2a | 20 75 73 65 2e 20 20 49 |t in.*.*| use. I|
|00001680| 20 66 6f 75 6e 64 20 53 | 61 6d 70 6c 65 2e 61 20 | found S|ample.a |
|00001690| 74 6f 20 62 65 20 6d 6f | 73 74 20 68 65 6c 70 66 |to be mo|st helpf|
|000016a0| 75 6c 20 69 6e 20 6d 75 | 63 68 20 6f 66 20 77 68 |ul in mu|ch of wh|
|000016b0| 61 74 20 49 20 64 69 64 | 20 68 65 72 65 2e 09 09 |at I did| here...|
|000016c0| 09 09 09 2a 0d 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |...*.***|********|
|000016d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000016e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000016f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001700| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001710| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 0d 54 53 45 50 72 |********|**.TSEPr|
|00001720| 69 6d 65 09 09 50 52 4f | 43 09 09 09 45 58 50 4f |ime..PRO|C...EXPO|
|00001730| 52 54 09 09 09 09 09 09 | 09 3b 20 61 6e 79 20 73 |RT......|.; any s|
|00001740| 6f 75 72 63 65 20 66 69 | 6c 65 20 63 61 6e 20 75 |ource fi|le can u|
|00001750| 73 65 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 0d |se this |routine.|
|00001760| 0d 53 74 61 63 6b 46 72 | 61 6d 65 09 52 45 43 4f |.StackFr|ame.RECO|
|00001770| 52 44 09 09 7b 41 36 4c | 69 6e 6b 7d 2c 44 45 43 |RD..{A6L|ink},DEC|
|00001780| 52 09 09 09 09 09 3b 20 | 62 75 69 6c 64 20 61 20 |R.....; |build a |
|00001790| 73 74 61 63 6b 20 66 72 | 61 6d 65 20 72 65 63 6f |stack fr|ame reco|
|000017a0| 72 64 0d 52 65 73 75 6c | 74 31 09 09 44 53 2e 57 |rd.Resul|t1..DS.W|
|000017b0| 09 09 09 31 09 09 09 09 | 09 09 09 09 09 3b 20 66 |...1....|.....; f|
|000017c0| 75 6e 63 74 69 6f 6e 27 | 73 20 72 65 73 75 6c 74 |unction'|s result|
|000017d0| 20 72 65 74 75 72 6e 65 | 64 20 74 6f 20 63 61 6c | returne|d to cal|
|000017e0| 6c 65 72 0d 50 61 72 61 | 6d 42 65 67 69 6e 09 45 |ler.Para|mBegin.E|
|000017f0| 51 55 09 09 09 2a 09 09 | 09 09 09 09 09 09 09 3b |QU...*..|.......;|
|00001800| 20 73 74 61 72 74 20 70 | 61 72 61 6d 65 74 65 72 | start p|arameter|
|00001810| 73 20 61 66 74 65 72 20 | 74 68 69 73 20 70 6f 69 |s after |this poi|
|00001820| 6e 74 0d 50 61 72 61 6d | 53 69 7a 65 09 45 51 55 |nt.Param|Size.EQU|
|00001830| 09 09 09 50 61 72 61 6d | 42 65 67 69 6e 2d 2a 09 |...Param|Begin-*.|
|00001840| 09 09 09 09 3b 20 73 69 | 7a 65 20 6f 66 20 61 6c |....; si|ze of al|
|00001850| 6c 20 74 68 65 20 70 61 | 73 73 65 64 20 70 61 72 |l the pa|ssed par|
|00001860| 61 6d 65 74 65 72 73 0d | 52 65 74 41 64 64 72 20 |ameters.|RetAddr |
|00001870| 09 09 44 53 2e 4c 09 09 | 09 31 09 09 09 09 09 09 |..DS.L..|.1......|
|00001880| 09 09 09 3b 20 70 6c 61 | 63 65 20 68 6f 6c 64 65 |...; pla|ce holde|
|00001890| 72 20 66 6f 72 20 72 65 | 74 75 72 6e 20 61 64 64 |r for re|turn add|
|000018a0| 72 65 73 73 0d 41 36 4c | 69 6e 6b 09 09 44 53 2e |ress.A6L|ink..DS.|
|000018b0| 4c 09 09 09 31 09 09 09 | 09 09 09 09 09 09 3b 20 |L...1...|......; |
|000018c0| 70 6c 61 63 65 20 68 6f | 6c 64 65 72 20 66 6f 72 |place ho|lder for|
|000018d0| 20 41 36 20 6c 69 6e 6b | 0d 4c 6f 63 61 6c 53 69 | A6 link|.LocalSi|
|000018e0| 7a 65 09 45 51 55 20 09 | 09 09 2a 09 09 09 09 09 |ze.EQU .|..*.....|
|000018f0| 09 09 09 09 3b 20 73 69 | 7a 65 20 6f 66 20 61 6c |....; si|ze of al|
|00001900| 6c 20 74 68 65 20 6c 6f | 63 61 6c 20 76 61 72 69 |l the lo|cal vari|
|00001910| 61 62 6c 65 73 0d 09 09 | 09 09 45 4e 44 52 0d 0d |ables...|..ENDR..|
|00001920| 09 09 09 09 57 49 54 48 | 09 09 09 53 74 61 63 6b |....WITH|...Stack|
|00001930| 46 72 61 6d 65 09 09 09 | 09 09 09 3b 20 63 6f 76 |Frame...|...; cov|
|00001940| 65 72 20 6f 75 72 20 6c | 6f 63 61 6c 20 73 74 61 |er our l|ocal sta|
|00001950| 63 6b 20 66 72 61 6d 65 | 0d 09 09 09 09 4c 49 4e |ck frame|.....LIN|
|00001960| 4b 09 09 09 41 36 2c 23 | 4c 6f 63 61 6c 53 69 7a |K...A6,#|LocalSiz|
|00001970| 65 09 09 09 09 09 3b 20 | 61 6c 6c 6f 63 61 74 65 |e.....; |allocate|
|00001980| 20 6f 75 72 20 6c 6f 63 | 61 6c 20 73 74 61 63 6b | our loc|al stack|
|00001990| 20 66 72 61 6d 65 0d 09 | 09 09 09 0d 09 09 09 09 | frame..|........|
|000019a0| 0d 09 09 20 09 09 4d 4f | 56 45 4d 2e 4c 20 09 09 |... ..MO|VEM.L ..|
|000019b0| 44 31 2d 44 33 2f 41 30 | 2d 41 34 2c 2d 28 41 37 |D1-D3/A0|-A4,-(A7|
|000019c0| 29 20 20 20 09 09 09 3b | 53 61 76 65 20 72 65 67 |) ...;|Save reg|
|000019d0| 69 73 74 65 72 73 20 28 | 56 31 2e 31 41 29 0d 09 |isters (|V1.1A)..|
|000019e0| 09 09 09 4d 4f 56 45 2e | 4c 09 09 41 31 2c 2d 28 |...MOVE.|L..A1,-(|
|000019f0| 41 37 29 09 09 09 09 09 | 09 09 3b 50 75 74 20 61 |A7).....|..;Put a|
|00001a00| 64 64 72 65 73 73 20 6f | 66 20 44 43 45 20 6f 6e |ddress o|f DCE on|
|00001a10| 74 6f 20 73 74 61 63 6b | 0d 09 09 09 09 4d 4f 56 |to stack|.....MOV|
|00001a20| 45 2e 4c 09 09 41 30 2c | 2d 28 41 37 29 09 09 09 |E.L..A0,|-(A7)...|
|00001a30| 09 09 09 09 3b 50 75 74 | 20 61 64 64 72 65 73 73 |....;Put| address|
|00001a40| 20 6f 66 20 50 61 72 61 | 6d 42 6c 6f 63 6b 20 6f | of Para|mBlock o|
|00001a50| 6e 74 6f 20 73 74 61 63 | 6b 0d 09 09 09 09 4a 53 |nto stac|k.....JS|
|00001a60| 52 20 09 09 09 54 50 72 | 69 6d 65 09 09 09 09 09 |R ...TPr|ime.....|
|00001a70| 09 3b 43 61 6c 6c 20 6f | 75 72 20 72 6f 75 74 69 |.;Call o|ur routi|
|00001a80| 6e 65 2e 0d 09 09 09 09 | 41 44 44 51 2e 57 09 09 |ne......|ADDQ.W..|
|00001a90| 23 24 38 2c 41 37 09 09 | 09 09 09 09 09 3b 54 61 |#$8,A7..|.....;Ta|
|00001aa0| 6b 65 20 6f 66 66 20 41 | 30 20 61 6e 64 20 41 31 |ke off A|0 and A1|
|00001ab0| 20 77 65 20 70 75 73 68 | 65 64 2e 0d 09 09 09 09 | we push|ed......|
|00001ac0| 41 44 44 41 2e 4c 09 09 | 23 50 61 72 61 6d 53 69 |ADDA.L..|#ParamSi|
|00001ad0| 7a 65 2c 53 50 09 09 09 | 09 09 3b 73 74 72 69 70 |ze,SP...|..;strip|
|00001ae0| 20 61 6c 6c 20 6f 66 20 | 74 68 65 20 63 61 6c 6c | all of |the call|
|00001af0| 65 72 27 73 20 70 61 72 | 61 6d 65 74 65 72 73 0d |er's par|ameters.|
|00001b00| 09 09 09 09 4d 4f 56 45 | 4d 2e 4c 20 09 09 28 41 |....MOVE|M.L ..(A|
|00001b10| 37 29 2b 2c 44 31 2d 44 | 33 2f 41 30 2d 41 34 20 |7)+,D1-D|3/A0-A4 |
|00001b20| 20 20 20 09 09 3b 52 65 | 73 74 6f 72 65 20 72 65 | ..;Re|store re|
|00001b30| 67 69 73 74 65 72 73 20 | 28 56 31 2e 31 41 29 0d |gisters |(V1.1A).|
|00001b40| 09 09 09 09 53 57 41 50 | 09 09 09 44 30 09 09 09 |....SWAP|...D0...|
|00001b50| 09 09 09 09 09 09 3b 53 | 61 76 65 20 72 65 73 75 |......;S|ave resu|
|00001b60| 6c 74 20 69 6e 20 4d 6f | 73 74 53 69 67 20 57 6f |lt in Mo|stSig Wo|
|00001b70| 72 64 0d 09 09 09 09 4d | 4f 56 45 2e 57 09 09 69 |rd.....M|OVE.W..i|
|00001b80| 6f 54 72 61 70 28 41 30 | 29 2c 44 30 09 09 09 09 |oTrap(A0|),D0....|
|00001b90| 09 3b 6d 6f 76 65 20 69 | 6f 54 72 61 70 20 69 6e |.;move i|oTrap in|
|00001ba0| 74 6f 20 72 65 67 69 73 | 74 65 72 20 73 6f 20 77 |to regis|ter so w|
|00001bb0| 65 20 63 61 6e 20 74 65 | 73 74 0d 09 09 09 09 53 |e can te|st.....S|
|00001bc0| 57 41 50 09 09 09 44 30 | 09 09 09 09 09 09 09 09 |WAP...D0|........|
|00001bd0| 09 3b 42 61 63 6b 20 61 | 67 61 69 6e 0d 09 09 09 |.;Back a|gain....|
|00001be0| 09 42 54 53 54 09 09 09 | 23 28 6e 6f 51 75 65 75 |.BTST...|#(noQueu|
|00001bf0| 65 42 69 74 2b 31 36 29 | 2c 20 44 30 09 09 09 3b |eBit+16)|, D0...;|
|00001c00| 54 65 73 74 20 74 68 65 | 20 62 69 74 2e 0d 09 09 |Test the| bit....|
|00001c10| 09 09 42 4e 45 2e 53 09 | 09 09 50 72 69 6d 65 52 |..BNE.S.|..PrimeR|
|00001c20| 54 53 09 09 09 09 09 09 | 09 3b 49 66 20 5a 20 3d |TS......|.;If Z =|
|00001c30| 20 30 2c 20 74 68 65 6e | 20 6e 6f 51 75 65 75 65 | 0, then| noQueue|
|00001c40| 42 69 74 20 73 65 74 20 | 2d 2d 20 62 72 61 6e 63 |Bit set |-- branc|
|00001c50| 68 0d 0d 09 09 09 09 43 | 4d 50 2e 57 09 09 09 23 |h......C|MP.W...#|
|00001c60| 24 31 2c 44 30 09 09 09 | 09 09 09 09 3b 43 6f 6d |$1,D0...|....;Com|
|00001c70| 70 61 72 65 20 72 65 73 | 75 6c 74 20 77 69 74 68 |pare res|ult with|
|00001c80| 20 31 0d 09 09 09 09 42 | 45 51 2e 53 09 09 09 50 | 1.....B|EQ.S...P|
|00001c90| 72 69 6d 65 52 54 53 09 | 09 09 09 09 09 09 3b 4e |rimeRTS.|......;N|
|00001ca0| 6f 74 20 65 71 75 61 6c | 20 74 6f 20 7a 65 72 6f |ot equal| to zero|
|00001cb0| 20 73 6f 20 52 54 53 2e | 0d 09 09 09 09 55 4e 4c | so RTS.|.....UNL|
|00001cc0| 4b 09 09 09 41 36 09 09 | 09 09 09 09 09 09 09 3b |K...A6..|.......;|
|00001cd0| 64 65 73 74 72 6f 79 20 | 74 68 65 20 6c 69 6e 6b |destroy |the link|
|00001ce0| 0d 09 09 09 09 4d 4f 56 | 45 2e 4c 09 09 6a 49 4f |.....MOV|E.L..jIO|
|00001cf0| 44 6f 6e 65 2c 2d 28 41 | 37 29 09 09 09 09 09 3b |Done,-(A|7).....;|
|00001d00| 50 75 74 20 6a 49 4f 44 | 6f 6e 65 20 6f 6e 20 74 |Put jIOD|one on t|
|00001d10| 68 65 20 73 74 61 63 6b | 0d 09 09 09 09 52 54 53 |he stack|.....RTS|
|00001d20| 09 09 09 09 09 09 09 09 | 09 09 09 09 3b 72 65 74 |........|....;ret|
|00001d30| 75 72 6e 20 74 6f 20 74 | 68 65 20 63 61 6c 6c 65 |urn to t|he calle|
|00001d40| 72 0d 09 09 09 09 0d 50 | 72 69 6d 65 52 54 53 09 |r......P|rimeRTS.|
|00001d50| 09 55 4e 4c 4b 09 09 09 | 41 36 09 09 09 09 09 09 |.UNLK...|A6......|
|00001d60| 09 09 09 3b 64 65 73 74 | 72 6f 79 20 74 68 65 20 |...;dest|roy the |
|00001d70| 6c 69 6e 6b 0d 09 09 09 | 09 52 54 53 09 09 09 09 |link....|.RTS....|
|00001d80| 09 09 09 09 09 09 09 09 | 3b 72 65 74 75 72 6e 20 |........|;return |
|00001d90| 74 6f 20 74 68 65 20 63 | 61 6c 6c 65 72 0d 09 09 |to the c|aller...|
|00001da0| 09 09 44 62 67 49 6e 66 | 6f 09 09 54 53 45 50 72 |..DbgInf|o..TSEPr|
|00001db0| 69 6d 65 09 09 09 09 09 | 09 09 3b 74 68 69 73 20 |ime.....|..;this |
|00001dc0| 6e 61 6d 65 20 77 69 6c | 6c 20 61 70 70 65 61 72 |name wil|l appear|
|00001dd0| 20 69 6e 20 74 68 65 20 | 64 65 62 75 67 67 65 72 | in the |debugger|
|00001de0| 0d 09 09 09 09 45 4e 44 | 50 0d 0d 0d 0d 0d 2a 2a |.....END|P.....**|
|00001df0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001e00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001e10| 2a 20 54 53 45 43 6f 6e | 74 72 6f 6c 20 2a 2a 2a |* TSECon|trol ***|
|00001e20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001e30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001e40| 2a 2a 2a 2a 0d 2a 20 54 | 68 69 73 20 72 6f 75 74 |****.* T|his rout|
|00001e50| 69 6e 65 20 28 61 6e 64 | 20 61 6c 6c 20 6c 69 6b |ine (and| all lik|
|00001e60| 65 20 69 74 20 62 65 6c | 6f 77 29 20 70 65 72 66 |e it bel|ow) perf|
|00001e70| 6f 72 6d 73 20 74 68 72 | 65 65 20 62 61 73 69 63 |orms thr|ee basic|
|00001e80| 20 66 75 6e 63 74 69 6f | 6e 73 3a 20 09 09 09 09 | functio|ns: ....|
|00001e90| 09 2a 0d 2a 20 31 29 20 | 70 75 73 68 69 6e 67 20 |.*.* 1) |pushing |
|00001ea0| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 20 62 6c |the para|meter bl|
|00001eb0| 6f 63 6b 20 28 41 30 29 | 2c 20 61 6e 64 20 74 68 |ock (A0)|, and th|
|00001ec0| 65 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |e pointe|r to the|
|00001ed0| 20 44 43 45 20 28 41 31 | 29 20 6f 6e 20 74 68 65 | DCE (A1|) on the|
|00001ee0| 20 73 74 61 63 6b 2e 2a | 0d 2a 20 32 29 20 54 65 | stack.*|.* 2) Te|
|00001ef0| 73 74 69 6e 67 20 74 6f | 20 73 65 65 20 77 68 65 |sting to| see whe|
|00001f00| 74 68 65 72 20 74 68 65 | 20 69 6d 6d 65 64 69 61 |ther the| immedia|
|00001f10| 74 65 20 62 69 74 20 77 | 61 73 20 73 65 74 20 69 |te bit w|as set i|
|00001f20| 6e 20 74 68 65 20 74 72 | 61 70 20 77 6f 72 64 20 |n the tr|ap word |
|00001f30| 61 6e 64 20 52 54 53 69 | 6e 67 09 2a 0d 2a 20 33 |and RTSi|ng.*.* 3|
|00001f40| 29 20 54 65 73 74 69 6e | 67 20 74 68 65 20 72 65 |) Testin|g the re|
|00001f50| 73 75 6c 74 20 69 6e 20 | 44 30 2e 20 20 49 66 20 |sult in |D0. If |
|00001f60| 69 74 27 73 20 31 20 74 | 68 65 20 6f 70 65 72 61 |it's 1 t|he opera|
|00001f70| 74 69 6f 6e 20 68 61 73 | 6e 27 74 20 63 6f 6d 70 |tion has|n't comp|
|00001f80| 6c 65 74 65 64 20 79 65 | 74 2c 20 73 6f 20 77 65 |leted ye|t, so we|
|00001f90| 09 2a 0d 2a 20 20 20 20 | 6a 75 73 74 20 77 61 6e |.*.* |just wan|
|00001fa0| 74 20 74 6f 20 52 54 53 | 2e 20 20 49 66 20 69 74 |t to RTS|. If it|
|00001fb0| 27 73 20 4e 4f 54 20 31 | 2c 20 74 68 65 6e 20 77 |'s NOT 1|, then w|
|00001fc0| 65 27 6c 6c 20 6a 75 6d | 70 20 74 68 72 6f 75 67 |e'll jum|p throug|
|00001fd0| 68 20 6a 49 4f 44 6f 6e | 65 2e 09 09 09 09 09 2a |h jIODon|e......*|
|00001fe0| 0d 2a 20 49 20 70 75 74 | 20 74 68 65 20 73 74 61 |.* I put| the sta|
|00001ff0| 6e 64 61 72 64 20 70 72 | 6f 63 65 64 75 72 65 20 |ndard pr|ocedure |
|00002000| 68 65 61 64 65 72 20 69 | 6e 20 6a 75 73 74 20 73 |header i|n just s|
|00002010| 6f 20 79 6f 75 27 64 20 | 73 65 65 20 61 6e 6f 74 |o you'd |see anot|
|00002020| 68 65 72 20 65 78 61 6d | 70 6c 65 20 6f 66 20 69 |her exam|ple of i|
|00002030| 74 20 69 6e 09 2a 0d 2a | 20 75 73 65 2e 20 20 49 |t in.*.*| use. I|
|00002040| 20 66 6f 75 6e 64 20 53 | 61 6d 70 6c 65 2e 61 20 | found S|ample.a |
|00002050| 74 6f 20 62 65 20 6d 6f | 73 74 20 68 65 6c 70 66 |to be mo|st helpf|
|00002060| 75 6c 20 69 6e 20 6d 75 | 63 68 20 6f 66 20 77 68 |ul in mu|ch of wh|
|00002070| 61 74 20 49 20 64 69 64 | 20 68 65 72 65 2e 09 09 |at I did| here...|
|00002080| 09 09 09 2a 0d 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |...*.***|********|
|00002090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000020a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000020b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000020c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000020d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 0d 54 53 45 43 6f |********|**.TSECo|
|000020e0| 6e 74 72 6f 6c 09 50 52 | 4f 43 09 09 09 45 58 50 |ntrol.PR|OC...EXP|
|000020f0| 4f 52 54 09 09 09 09 09 | 09 09 3b 20 61 6e 79 20 |ORT.....|..; any |
|00002100| 73 6f 75 72 63 65 20 66 | 69 6c 65 20 63 61 6e 20 |source f|ile can |
|00002110| 75 73 65 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |use this| routine|
|00002120| 0d 0d 53 74 61 63 6b 46 | 72 61 6d 65 09 52 45 43 |..StackF|rame.REC|
|00002130| 4f 52 44 09 09 7b 41 36 | 4c 69 6e 6b 7d 2c 44 45 |ORD..{A6|Link},DE|
|00002140| 43 52 09 09 09 09 09 3b | 20 62 75 69 6c 64 20 61 |CR.....;| build a|
|00002150| 20 73 74 61 63 6b 20 66 | 72 61 6d 65 20 72 65 63 | stack f|rame rec|
|00002160| 6f 72 64 0d 52 65 73 75 | 6c 74 31 09 09 44 53 2e |ord.Resu|lt1..DS.|
|00002170| 57 09 09 09 31 09 09 09 | 09 09 09 09 09 09 3b 20 |W...1...|......; |
|00002180| 66 75 6e 63 74 69 6f 6e | 27 73 20 72 65 73 75 6c |function|'s resul|
|00002190| 74 20 72 65 74 75 72 6e | 65 64 20 74 6f 20 63 61 |t return|ed to ca|
|000021a0| 6c 6c 65 72 0d 50 61 72 | 61 6d 42 65 67 69 6e 09 |ller.Par|amBegin.|
|000021b0| 45 51 55 09 09 09 2a 09 | 09 09 09 09 09 09 09 09 |EQU...*.|........|
|000021c0| 3b 20 73 74 61 72 74 20 | 70 61 72 61 6d 65 74 65 |; start |paramete|
|000021d0| 72 73 20 61 66 74 65 72 | 20 74 68 69 73 20 70 6f |rs after| this po|
|000021e0| 69 6e 74 0d 50 61 72 61 | 6d 53 69 7a 65 09 45 51 |int.Para|mSize.EQ|
|000021f0| 55 09 09 09 50 61 72 61 | 6d 42 65 67 69 6e 2d 2a |U...Para|mBegin-*|
|00002200| 09 09 09 09 09 3b 20 73 | 69 7a 65 20 6f 66 20 61 |.....; s|ize of a|
|00002210| 6c 6c 20 74 68 65 20 70 | 61 73 73 65 64 20 70 61 |ll the p|assed pa|
|00002220| 72 61 6d 65 74 65 72 73 | 0d 52 65 74 41 64 64 72 |rameters|.RetAddr|
|00002230| 20 09 09 44 53 2e 4c 09 | 09 09 31 09 09 09 09 09 | ..DS.L.|..1.....|
|00002240| 09 09 09 09 3b 20 70 6c | 61 63 65 20 68 6f 6c 64 |....; pl|ace hold|
|00002250| 65 72 20 66 6f 72 20 72 | 65 74 75 72 6e 20 61 64 |er for r|eturn ad|
|00002260| 64 72 65 73 73 0d 41 36 | 4c 69 6e 6b 09 09 44 53 |dress.A6|Link..DS|
|00002270| 2e 4c 09 09 09 31 09 09 | 09 09 09 09 09 09 09 3b |.L...1..|.......;|
|00002280| 20 70 6c 61 63 65 20 68 | 6f 6c 64 65 72 20 66 6f | place h|older fo|
|00002290| 72 20 41 36 20 6c 69 6e | 6b 0d 4c 6f 63 61 6c 53 |r A6 lin|k.LocalS|
|000022a0| 69 7a 65 09 45 51 55 20 | 09 09 09 2a 09 09 09 09 |ize.EQU |...*....|
|000022b0| 09 09 09 09 09 3b 20 73 | 69 7a 65 20 6f 66 20 61 |.....; s|ize of a|
|000022c0| 6c 6c 20 74 68 65 20 6c | 6f 63 61 6c 20 76 61 72 |ll the l|ocal var|
|000022d0| 69 61 62 6c 65 73 0d 09 | 09 09 09 45 4e 44 52 0d |iables..|...ENDR.|
|000022e0| 0d 09 09 09 09 57 49 54 | 48 09 09 09 53 74 61 63 |.....WIT|H...Stac|
|000022f0| 6b 46 72 61 6d 65 09 09 | 09 09 09 09 3b 20 63 6f |kFrame..|....; co|
|00002300| 76 65 72 20 6f 75 72 20 | 6c 6f 63 61 6c 20 73 74 |ver our |local st|
|00002310| 61 63 6b 20 66 72 61 6d | 65 0d 09 09 09 09 4c 49 |ack fram|e.....LI|
|00002320| 4e 4b 09 09 09 41 36 2c | 23 4c 6f 63 61 6c 53 69 |NK...A6,|#LocalSi|
|00002330| 7a 65 09 09 09 09 09 3b | 20 61 6c 6c 6f 63 61 74 |ze.....;| allocat|
|00002340| 65 20 6f 75 72 20 6c 6f | 63 61 6c 20 73 74 61 63 |e our lo|cal stac|
|00002350| 6b 20 66 72 61 6d 65 0d | 09 09 09 09 0d 09 09 20 |k frame.|....... |
|00002360| 09 09 4d 4f 56 45 4d 2e | 4c 20 09 09 44 31 2d 44 |..MOVEM.|L ..D1-D|
|00002370| 33 2f 41 30 2d 41 34 2c | 2d 28 41 37 29 20 20 20 |3/A0-A4,|-(A7) |
|00002380| 09 09 09 3b 53 61 76 65 | 20 72 65 67 69 73 74 65 |...;Save| registe|
|00002390| 72 73 20 28 56 31 2e 31 | 41 29 0d 09 09 09 09 4d |rs (V1.1|A).....M|
|000023a0| 4f 56 45 2e 4c 09 09 41 | 31 2c 2d 28 41 37 29 09 |OVE.L..A|1,-(A7).|
|000023b0| 09 09 09 09 09 09 3b 50 | 75 74 20 61 64 64 72 65 |......;P|ut addre|
|000023c0| 73 73 20 6f 66 20 44 43 | 45 20 6f 6e 74 6f 20 73 |ss of DC|E onto s|
|000023d0| 74 61 63 6b 0d 09 09 09 | 09 4d 4f 56 45 2e 4c 09 |tack....|.MOVE.L.|
|000023e0| 09 41 30 2c 2d 28 41 37 | 29 09 09 09 09 09 09 09 |.A0,-(A7|).......|
|000023f0| 3b 50 75 74 20 61 64 64 | 72 65 73 73 20 6f 66 20 |;Put add|ress of |
|00002400| 50 61 72 61 6d 42 6c 6f | 63 6b 20 6f 6e 74 6f 20 |ParamBlo|ck onto |
|00002410| 73 74 61 63 6b 0d 09 09 | 09 09 4a 53 52 20 09 09 |stack...|..JSR ..|
|00002420| 09 54 43 6f 6e 74 72 6f | 6c 09 09 09 09 09 3b 43 |.TContro|l.....;C|
|00002430| 61 6c 6c 20 6f 75 72 20 | 72 6f 75 74 69 6e 65 2e |all our |routine.|
|00002440| 0d 09 09 09 09 41 44 44 | 51 2e 57 09 09 23 24 38 |.....ADD|Q.W..#$8|
|00002450| 2c 41 37 09 09 09 09 09 | 09 09 3b 54 61 6b 65 20 |,A7.....|..;Take |
|00002460| 6f 66 66 20 41 30 20 61 | 6e 64 20 41 31 20 77 65 |off A0 a|nd A1 we|
|00002470| 20 70 75 73 68 65 64 2e | 0d 09 09 09 09 41 44 44 | pushed.|.....ADD|
|00002480| 41 2e 4c 09 09 23 50 61 | 72 61 6d 53 69 7a 65 2c |A.L..#Pa|ramSize,|
|00002490| 53 50 09 09 09 09 09 3b | 73 74 72 69 70 20 61 6c |SP.....;|strip al|
|000024a0| 6c 20 6f 66 20 74 68 65 | 20 63 61 6c 6c 65 72 27 |l of the| caller'|
|000024b0| 73 20 70 61 72 61 6d 65 | 74 65 72 73 0d 09 09 09 |s parame|ters....|
|000024c0| 09 4d 4f 56 45 4d 2e 4c | 20 09 09 28 41 37 29 2b |.MOVEM.L| ..(A7)+|
|000024d0| 2c 44 31 2d 44 33 2f 41 | 30 2d 41 34 20 20 20 20 |,D1-D3/A|0-A4 |
|000024e0| 09 09 3b 52 65 73 74 6f | 72 65 20 72 65 67 69 73 |..;Resto|re regis|
|000024f0| 74 65 72 73 20 28 56 31 | 2e 31 41 29 0d 09 09 09 |ters (V1|.1A)....|
|00002500| 09 53 57 41 50 09 09 09 | 44 30 09 09 09 09 09 09 |.SWAP...|D0......|
|00002510| 09 09 09 3b 53 61 76 65 | 20 72 65 73 75 6c 74 20 |...;Save| result |
|00002520| 69 6e 20 4d 6f 73 74 53 | 69 67 20 57 6f 72 64 0d |in MostS|ig Word.|
|00002530| 09 09 09 09 4d 4f 56 45 | 2e 57 09 09 69 6f 54 72 |....MOVE|.W..ioTr|
|00002540| 61 70 28 41 30 29 2c 44 | 30 09 09 09 09 09 3b 6d |ap(A0),D|0.....;m|
|00002550| 6f 76 65 20 69 6f 54 72 | 61 70 20 69 6e 74 6f 20 |ove ioTr|ap into |
|00002560| 72 65 67 69 73 74 65 72 | 20 73 6f 20 77 65 20 63 |register| so we c|
|00002570| 61 6e 20 74 65 73 74 0d | 09 09 09 09 53 57 41 50 |an test.|....SWAP|
|00002580| 09 09 09 44 30 09 09 09 | 09 09 09 09 09 09 3b 42 |...D0...|......;B|
|00002590| 61 63 6b 20 61 67 61 69 | 6e 0d 09 09 09 09 42 54 |ack agai|n.....BT|
|000025a0| 53 54 09 09 09 23 28 6e | 6f 51 75 65 75 65 42 69 |ST...#(n|oQueueBi|
|000025b0| 74 2b 31 36 29 2c 20 44 | 30 09 09 09 3b 54 65 73 |t+16), D|0...;Tes|
|000025c0| 74 20 74 68 65 20 62 69 | 74 2e 0d 09 09 09 09 42 |t the bi|t......B|
|000025d0| 4e 45 2e 53 09 09 09 43 | 6f 6e 74 72 6f 6c 52 54 |NE.S...C|ontrolRT|
|000025e0| 53 09 09 09 09 09 09 3b | 49 66 20 5a 20 3d 20 30 |S......;|If Z = 0|
|000025f0| 2c 20 74 68 65 6e 20 6e | 6f 51 75 65 75 65 42 69 |, then n|oQueueBi|
|00002600| 74 20 73 65 74 20 2d 2d | 20 62 72 61 6e 63 68 0d |t set --| branch.|
|00002610| 0d 09 09 09 09 43 4d 50 | 2e 57 09 09 09 23 24 31 |.....CMP|.W...#$1|
|00002620| 2c 44 30 09 09 09 09 09 | 09 09 3b 43 6f 6d 70 61 |,D0.....|..;Compa|
|00002630| 72 65 20 72 65 73 75 6c | 74 20 77 69 74 68 20 31 |re resul|t with 1|
|00002640| 0d 09 09 09 09 42 45 51 | 2e 53 09 09 09 43 6f 6e |.....BEQ|.S...Con|
|00002650| 74 72 6f 6c 52 54 53 09 | 09 09 09 09 09 3b 4e 6f |trolRTS.|.....;No|
|00002660| 74 20 65 71 75 61 6c 20 | 74 6f 20 7a 65 72 6f 20 |t equal |to zero |
|00002670| 73 6f 20 52 54 53 2e 0d | 09 09 09 09 55 4e 4c 4b |so RTS..|....UNLK|
|00002680| 09 09 09 41 36 09 09 09 | 09 09 09 09 09 09 3b 64 |...A6...|......;d|
|00002690| 65 73 74 72 6f 79 20 74 | 68 65 20 6c 69 6e 6b 0d |estroy t|he link.|
|000026a0| 09 09 09 09 4d 4f 56 45 | 2e 4c 09 09 6a 49 4f 44 |....MOVE|.L..jIOD|
|000026b0| 6f 6e 65 2c 2d 28 41 37 | 29 09 09 09 09 09 3b 50 |one,-(A7|).....;P|
|000026c0| 75 74 20 6a 49 4f 44 6f | 6e 65 20 6f 6e 20 74 68 |ut jIODo|ne on th|
|000026d0| 65 20 73 74 61 63 6b 0d | 09 09 09 09 52 54 53 09 |e stack.|....RTS.|
|000026e0| 09 09 09 09 09 09 09 09 | 09 09 09 3b 72 65 74 75 |........|...;retu|
|000026f0| 72 6e 20 74 6f 20 74 68 | 65 20 63 61 6c 6c 65 72 |rn to th|e caller|
|00002700| 0d 09 09 09 09 0d 43 6f | 6e 74 72 6f 6c 52 54 53 |......Co|ntrolRTS|
|00002710| 09 55 4e 4c 4b 09 09 09 | 41 36 09 09 09 09 09 09 |.UNLK...|A6......|
|00002720| 09 09 09 3b 64 65 73 74 | 72 6f 79 20 74 68 65 20 |...;dest|roy the |
|00002730| 6c 69 6e 6b 0d 09 09 09 | 09 52 54 53 09 09 09 09 |link....|.RTS....|
|00002740| 09 09 09 09 09 09 09 09 | 3b 72 65 74 75 72 6e 20 |........|;return |
|00002750| 74 6f 20 74 68 65 20 63 | 61 6c 6c 65 72 0d 09 09 |to the c|aller...|
|00002760| 09 09 44 62 67 49 6e 66 | 6f 09 09 54 53 45 43 6f |..DbgInf|o..TSECo|
|00002770| 6e 74 72 6f 6c 09 09 09 | 09 09 09 3b 74 68 69 73 |ntrol...|...;this|
|00002780| 20 6e 61 6d 65 20 77 69 | 6c 6c 20 61 70 70 65 61 | name wi|ll appea|
|00002790| 72 20 69 6e 20 74 68 65 | 20 64 65 62 75 67 67 65 |r in the| debugge|
|000027a0| 72 0d 09 09 09 09 45 4e | 44 50 0d 0d 0d 0d 0d 2a |r.....EN|DP.....*|
|000027b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000027c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000027d0| 2a 2a 20 54 53 45 53 74 | 61 74 75 73 20 2a 2a 2a |** TSESt|atus ***|
|000027e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000027f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002800| 2a 2a 2a 2a 2a 0d 2a 20 | 54 68 69 73 20 72 6f 75 |*****.* |This rou|
|00002810| 74 69 6e 65 20 28 61 6e | 64 20 61 6c 6c 20 6c 69 |tine (an|d all li|
|00002820| 6b 65 20 69 74 20 62 65 | 6c 6f 77 29 20 70 65 72 |ke it be|low) per|
|00002830| 66 6f 72 6d 73 20 74 68 | 72 65 65 20 62 61 73 69 |forms th|ree basi|
|00002840| 63 20 66 75 6e 63 74 69 | 6f 6e 73 3a 20 09 09 09 |c functi|ons: ...|
|00002850| 09 09 2a 0d 2a 20 31 29 | 20 70 75 73 68 69 6e 67 |..*.* 1)| pushing|
|00002860| 20 74 68 65 20 70 61 72 | 61 6d 65 74 65 72 20 62 | the par|ameter b|
|00002870| 6c 6f 63 6b 20 28 41 30 | 29 2c 20 61 6e 64 20 74 |lock (A0|), and t|
|00002880| 68 65 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 74 68 |he point|er to th|
|00002890| 65 20 44 43 45 20 28 41 | 31 29 20 6f 6e 20 74 68 |e DCE (A|1) on th|
|000028a0| 65 20 73 74 61 63 6b 2e | 2a 0d 2a 20 32 29 20 54 |e stack.|*.* 2) T|
|000028b0| 65 73 74 69 6e 67 20 74 | 6f 20 73 65 65 20 77 68 |esting t|o see wh|
|000028c0| 65 74 68 65 72 20 74 68 | 65 20 69 6d 6d 65 64 69 |ether th|e immedi|
|000028d0| 61 74 65 20 62 69 74 20 | 77 61 73 20 73 65 74 20 |ate bit |was set |
|000028e0| 69 6e 20 74 68 65 20 74 | 72 61 70 20 77 6f 72 64 |in the t|rap word|
|000028f0| 20 61 6e 64 20 52 54 53 | 69 6e 67 09 2a 0d 2a 20 | and RTS|ing.*.* |
|00002900| 33 29 20 54 65 73 74 69 | 6e 67 20 74 68 65 20 72 |3) Testi|ng the r|
|00002910| 65 73 75 6c 74 20 69 6e | 20 44 30 2e 20 20 49 66 |esult in| D0. If|
|00002920| 20 69 74 27 73 20 31 20 | 74 68 65 20 6f 70 65 72 | it's 1 |the oper|
|00002930| 61 74 69 6f 6e 20 68 61 | 73 6e 27 74 20 63 6f 6d |ation ha|sn't com|
|00002940| 70 6c 65 74 65 64 20 79 | 65 74 2c 20 73 6f 20 77 |pleted y|et, so w|
|00002950| 65 09 2a 0d 2a 20 20 20 | 20 6a 75 73 74 20 77 61 |e.*.* | just wa|
|00002960| 6e 74 20 74 6f 20 52 54 | 53 2e 20 20 49 66 20 69 |nt to RT|S. If i|
|00002970| 74 27 73 20 4e 4f 54 20 | 31 2c 20 74 68 65 6e 20 |t's NOT |1, then |
|00002980| 77 65 27 6c 6c 20 6a 75 | 6d 70 20 74 68 72 6f 75 |we'll ju|mp throu|
|00002990| 67 68 20 6a 49 4f 44 6f | 6e 65 2e 09 09 09 09 09 |gh jIODo|ne......|
|000029a0| 2a 0d 2a 20 49 20 70 75 | 74 20 74 68 65 20 73 74 |*.* I pu|t the st|
|000029b0| 61 6e 64 61 72 64 20 70 | 72 6f 63 65 64 75 72 65 |andard p|rocedure|
|000029c0| 20 68 65 61 64 65 72 20 | 69 6e 20 6a 75 73 74 20 | header |in just |
|000029d0| 73 6f 20 79 6f 75 27 64 | 20 73 65 65 20 61 6e 6f |so you'd| see ano|
|000029e0| 74 68 65 72 20 65 78 61 | 6d 70 6c 65 20 6f 66 20 |ther exa|mple of |
|000029f0| 69 74 20 69 6e 09 2a 0d | 2a 20 75 73 65 2e 20 20 |it in.*.|* use. |
|00002a00| 49 20 66 6f 75 6e 64 20 | 53 61 6d 70 6c 65 2e 61 |I found |Sample.a|
|00002a10| 20 74 6f 20 62 65 20 6d | 6f 73 74 20 68 65 6c 70 | to be m|ost help|
|00002a20| 66 75 6c 20 69 6e 20 6d | 75 63 68 20 6f 66 20 77 |ful in m|uch of w|
|00002a30| 68 61 74 20 49 20 64 69 | 64 20 68 65 72 65 2e 09 |hat I di|d here..|
|00002a40| 09 09 09 09 2a 0d 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |....*.**|********|
|00002a50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002a60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002a70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002a80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002a90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 0d 54 53 45 53 |********|***.TSES|
|00002aa0| 74 61 74 75 73 09 09 50 | 52 4f 43 09 09 09 45 58 |tatus..P|ROC...EX|
|00002ab0| 50 4f 52 54 09 09 09 09 | 09 09 09 3b 20 61 6e 79 |PORT....|...; any|
|00002ac0| 20 73 6f 75 72 63 65 20 | 66 69 6c 65 20 63 61 6e | source |file can|
|00002ad0| 20 75 73 65 20 74 68 69 | 73 20 72 6f 75 74 69 6e | use thi|s routin|
|00002ae0| 65 0d 0d 53 74 61 63 6b | 46 72 61 6d 65 09 52 45 |e..Stack|Frame.RE|
|00002af0| 43 4f 52 44 09 09 7b 41 | 36 4c 69 6e 6b 7d 2c 44 |CORD..{A|6Link},D|
|00002b00| 45 43 52 09 09 09 09 09 | 3b 20 62 75 69 6c 64 20 |ECR.....|; build |
|00002b10| 61 20 73 74 61 63 6b 20 | 66 72 61 6d 65 20 72 65 |a stack |frame re|
|00002b20| 63 6f 72 64 0d 52 65 73 | 75 6c 74 31 09 09 44 53 |cord.Res|ult1..DS|
|00002b30| 2e 57 09 09 09 31 09 09 | 09 09 09 09 09 09 09 3b |.W...1..|.......;|
|00002b40| 20 66 75 6e 63 74 69 6f | 6e 27 73 20 72 65 73 75 | functio|n's resu|
|00002b50| 6c 74 20 72 65 74 75 72 | 6e 65 64 20 74 6f 20 63 |lt retur|ned to c|
|00002b60| 61 6c 6c 65 72 0d 50 61 | 72 61 6d 42 65 67 69 6e |aller.Pa|ramBegin|
|00002b70| 09 45 51 55 09 09 09 2a | 09 09 09 09 09 09 09 09 |.EQU...*|........|
|00002b80| 09 3b 20 73 74 61 72 74 | 20 70 61 72 61 6d 65 74 |.; start| paramet|
|00002b90| 65 72 73 20 61 66 74 65 | 72 20 74 68 69 73 20 70 |ers afte|r this p|
|00002ba0| 6f 69 6e 74 0d 50 61 72 | 61 6d 53 69 7a 65 09 45 |oint.Par|amSize.E|
|00002bb0| 51 55 09 09 09 50 61 72 | 61 6d 42 65 67 69 6e 2d |QU...Par|amBegin-|
|00002bc0| 2a 09 09 09 09 09 3b 20 | 73 69 7a 65 20 6f 66 20 |*.....; |size of |
|00002bd0| 61 6c 6c 20 74 68 65 20 | 70 61 73 73 65 64 20 70 |all the |passed p|
|00002be0| 61 72 61 6d 65 74 65 72 | 73 0d 52 65 74 41 64 64 |arameter|s.RetAdd|
|00002bf0| 72 20 09 09 44 53 2e 4c | 09 09 09 31 09 09 09 09 |r ..DS.L|...1....|
|00002c00| 09 09 09 09 09 3b 20 70 | 6c 61 63 65 20 68 6f 6c |.....; p|lace hol|
|00002c10| 64 65 72 20 66 6f 72 20 | 72 65 74 75 72 6e 20 61 |der for |return a|
|00002c20| 64 64 72 65 73 73 0d 41 | 36 4c 69 6e 6b 09 09 44 |ddress.A|6Link..D|
|00002c30| 53 2e 4c 09 09 09 31 09 | 09 09 09 09 09 09 09 09 |S.L...1.|........|
|00002c40| 3b 20 70 6c 61 63 65 20 | 68 6f 6c 64 65 72 20 66 |; place |holder f|
|00002c50| 6f 72 20 41 36 20 6c 69 | 6e 6b 0d 4c 6f 63 61 6c |or A6 li|nk.Local|
|00002c60| 53 69 7a 65 09 45 51 55 | 20 09 09 09 2a 09 09 09 |Size.EQU| ...*...|
|00002c70| 09 09 09 09 09 09 3b 20 | 73 69 7a 65 20 6f 66 20 |......; |size of |
|00002c80| 61 6c 6c 20 74 68 65 20 | 6c 6f 63 61 6c 20 76 61 |all the |local va|
|00002c90| 72 69 61 62 6c 65 73 0d | 09 09 09 09 45 4e 44 52 |riables.|....ENDR|
|00002ca0| 0d 0d 09 09 09 09 57 49 | 54 48 09 09 09 53 74 61 |......WI|TH...Sta|
|00002cb0| 63 6b 46 72 61 6d 65 09 | 09 09 09 09 09 3b 20 63 |ckFrame.|.....; c|
|00002cc0| 6f 76 65 72 20 6f 75 72 | 20 6c 6f 63 61 6c 20 73 |over our| local s|
|00002cd0| 74 61 63 6b 20 66 72 61 | 6d 65 0d 09 09 09 09 4c |tack fra|me.....L|
|00002ce0| 49 4e 4b 09 09 09 41 36 | 2c 23 4c 6f 63 61 6c 53 |INK...A6|,#LocalS|
|00002cf0| 69 7a 65 09 09 09 09 09 | 3b 20 61 6c 6c 6f 63 61 |ize.....|; alloca|
|00002d00| 74 65 20 6f 75 72 20 6c | 6f 63 61 6c 20 73 74 61 |te our l|ocal sta|
|00002d10| 63 6b 20 66 72 61 6d 65 | 0d 09 09 09 09 0d 09 09 |ck frame|........|
|00002d20| 09 09 0d 09 09 20 09 09 | 4d 4f 56 45 4d 2e 4c 20 |..... ..|MOVEM.L |
|00002d30| 09 09 44 31 2d 44 33 2f | 41 30 2d 41 34 2c 2d 28 |..D1-D3/|A0-A4,-(|
|00002d40| 41 37 29 20 20 20 09 09 | 09 3b 53 61 76 65 20 72 |A7) ..|.;Save r|
|00002d50| 65 67 69 73 74 65 72 73 | 20 28 56 31 2e 31 41 29 |egisters| (V1.1A)|
|00002d60| 0d 09 09 09 09 4d 4f 56 | 45 2e 4c 09 09 41 31 2c |.....MOV|E.L..A1,|
|00002d70| 2d 28 41 37 29 09 09 09 | 09 09 09 09 3b 50 75 74 |-(A7)...|....;Put|
|00002d80| 20 61 64 64 72 65 73 73 | 20 6f 66 20 44 43 45 20 | address| of DCE |
|00002d90| 6f 6e 74 6f 20 73 74 61 | 63 6b 0d 09 09 09 09 4d |onto sta|ck.....M|
|00002da0| 4f 56 45 2e 4c 09 09 41 | 30 2c 2d 28 41 37 29 09 |OVE.L..A|0,-(A7).|
|00002db0| 09 09 09 09 09 09 3b 50 | 75 74 20 61 64 64 72 65 |......;P|ut addre|
|00002dc0| 73 73 20 6f 66 20 50 61 | 72 61 6d 42 6c 6f 63 6b |ss of Pa|ramBlock|
|00002dd0| 20 6f 6e 74 6f 20 73 74 | 61 63 6b 0d 09 09 09 09 | onto st|ack.....|
|00002de0| 4a 53 52 20 09 09 09 54 | 53 74 61 74 75 73 09 09 |JSR ...T|Status..|
|00002df0| 09 09 09 3b 43 61 6c 6c | 20 6f 75 72 20 72 6f 75 |...;Call| our rou|
|00002e00| 74 69 6e 65 2e 0d 09 09 | 09 09 41 44 44 51 2e 57 |tine....|..ADDQ.W|
|00002e10| 09 09 23 24 38 2c 41 37 | 09 09 09 09 09 09 09 3b |..#$8,A7|.......;|
|00002e20| 54 61 6b 65 20 6f 66 66 | 20 41 30 20 61 6e 64 20 |Take off| A0 and |
|00002e30| 41 31 20 77 65 20 70 75 | 73 68 65 64 2e 0d 09 09 |A1 we pu|shed....|
|00002e40| 09 09 41 44 44 41 2e 4c | 09 09 23 50 61 72 61 6d |..ADDA.L|..#Param|
|00002e50| 53 69 7a 65 2c 53 50 09 | 09 09 09 09 3b 73 74 72 |Size,SP.|....;str|
|00002e60| 69 70 20 61 6c 6c 20 6f | 66 20 74 68 65 20 63 61 |ip all o|f the ca|
|00002e70| 6c 6c 65 72 27 73 20 70 | 61 72 61 6d 65 74 65 72 |ller's p|arameter|
|00002e80| 73 0d 09 09 09 09 4d 4f | 56 45 4d 2e 4c 20 09 09 |s.....MO|VEM.L ..|
|00002e90| 28 41 37 29 2b 2c 44 31 | 2d 44 33 2f 41 30 2d 41 |(A7)+,D1|-D3/A0-A|
|00002ea0| 34 20 20 20 20 09 09 3b | 52 65 73 74 6f 72 65 20 |4 ..;|Restore |
|00002eb0| 72 65 67 69 73 74 65 72 | 73 20 28 56 31 2e 31 41 |register|s (V1.1A|
|00002ec0| 29 0d 09 09 09 09 53 57 | 41 50 09 09 09 44 30 09 |).....SW|AP...D0.|
|00002ed0| 09 09 09 09 09 09 09 09 | 3b 53 61 76 65 20 72 65 |........|;Save re|
|00002ee0| 73 75 6c 74 20 69 6e 20 | 4d 6f 73 74 53 69 67 20 |sult in |MostSig |
|00002ef0| 57 6f 72 64 0d 09 09 09 | 09 4d 4f 56 45 2e 57 09 |Word....|.MOVE.W.|
|00002f00| 09 69 6f 54 72 61 70 28 | 41 30 29 2c 44 30 09 09 |.ioTrap(|A0),D0..|
|00002f10| 09 09 09 3b 6d 6f 76 65 | 20 69 6f 54 72 61 70 20 |...;move| ioTrap |
|00002f20| 69 6e 74 6f 20 72 65 67 | 69 73 74 65 72 20 73 6f |into reg|ister so|
|00002f30| 20 77 65 20 63 61 6e 20 | 74 65 73 74 0d 09 09 09 | we can |test....|
|00002f40| 09 53 57 41 50 09 09 09 | 44 30 09 09 09 09 09 09 |.SWAP...|D0......|
|00002f50| 09 09 09 3b 42 61 63 6b | 20 61 67 61 69 6e 0d 09 |...;Back| again..|
|00002f60| 09 09 09 42 54 53 54 09 | 09 09 23 28 6e 6f 51 75 |...BTST.|..#(noQu|
|00002f70| 65 75 65 42 69 74 2b 31 | 36 29 2c 20 44 30 09 09 |eueBit+1|6), D0..|
|00002f80| 09 3b 54 65 73 74 20 74 | 68 65 20 62 69 74 2e 0d |.;Test t|he bit..|
|00002f90| 09 09 09 09 42 4e 45 2e | 53 09 09 09 53 74 61 74 |....BNE.|S...Stat|
|00002fa0| 75 73 52 54 53 09 09 09 | 09 09 09 3b 49 66 20 5a |usRTS...|...;If Z|
|00002fb0| 20 3d 20 30 2c 20 74 68 | 65 6e 20 6e 6f 51 75 65 | = 0, th|en noQue|
|00002fc0| 75 65 42 69 74 20 73 65 | 74 20 2d 2d 20 62 72 61 |ueBit se|t -- bra|
|00002fd0| 6e 63 68 0d 0d 09 09 09 | 09 43 4d 50 2e 57 09 09 |nch.....|.CMP.W..|
|00002fe0| 09 23 24 31 2c 44 30 09 | 09 09 09 09 09 09 3b 43 |.#$1,D0.|......;C|
|00002ff0| 6f 6d 70 61 72 65 20 72 | 65 73 75 6c 74 20 77 69 |ompare r|esult wi|
|00003000| 74 68 20 31 0d 09 09 09 | 09 42 45 51 2e 53 09 09 |th 1....|.BEQ.S..|
|00003010| 09 53 74 61 74 75 73 52 | 54 53 09 09 09 09 09 09 |.StatusR|TS......|
|00003020| 3b 4e 6f 74 20 65 71 75 | 61 6c 20 74 6f 20 7a 65 |;Not equ|al to ze|
|00003030| 72 6f 20 73 6f 20 52 54 | 53 2e 0d 09 09 09 09 55 |ro so RT|S......U|
|00003040| 4e 4c 4b 09 09 09 41 36 | 09 09 09 09 09 09 09 09 |NLK...A6|........|
|00003050| 09 3b 64 65 73 74 72 6f | 79 20 74 68 65 20 6c 69 |.;destro|y the li|
|00003060| 6e 6b 0d 09 09 09 09 4d | 4f 56 45 2e 4c 09 09 6a |nk.....M|OVE.L..j|
|00003070| 49 4f 44 6f 6e 65 2c 2d | 28 41 37 29 09 09 09 09 |IODone,-|(A7)....|
|00003080| 09 3b 50 75 74 20 6a 49 | 4f 44 6f 6e 65 20 6f 6e |.;Put jI|ODone on|
|00003090| 20 74 68 65 20 73 74 61 | 63 6b 0d 09 09 09 09 52 | the sta|ck.....R|
|000030a0| 54 53 09 09 09 09 09 09 | 09 09 09 09 09 09 3b 72 |TS......|......;r|
|000030b0| 65 74 75 72 6e 20 74 6f | 20 74 68 65 20 63 61 6c |eturn to| the cal|
|000030c0| 6c 65 72 0d 09 09 09 09 | 0d 53 74 61 74 75 73 52 |ler.....|.StatusR|
|000030d0| 54 53 09 55 4e 4c 4b 09 | 09 09 41 36 09 09 09 09 |TS.UNLK.|..A6....|
|000030e0| 09 09 09 09 09 3b 64 65 | 73 74 72 6f 79 20 74 68 |.....;de|stroy th|
|000030f0| 65 20 6c 69 6e 6b 0d 09 | 09 09 09 52 54 53 09 09 |e link..|...RTS..|
|00003100| 09 09 09 09 09 09 09 09 | 09 09 3b 72 65 74 75 72 |........|..;retur|
|00003110| 6e 20 74 6f 20 74 68 65 | 20 63 61 6c 6c 65 72 0d |n to the| caller.|
|00003120| 09 09 09 09 44 62 67 49 | 6e 66 6f 09 09 54 53 45 |....DbgI|nfo..TSE|
|00003130| 53 74 61 74 75 73 09 09 | 09 09 09 09 3b 74 68 69 |Status..|....;thi|
|00003140| 73 20 6e 61 6d 65 20 77 | 69 6c 6c 20 61 70 70 65 |s name w|ill appe|
|00003150| 61 72 20 69 6e 20 74 68 | 65 20 64 65 62 75 67 67 |ar in th|e debugg|
|00003160| 65 72 0d 09 09 09 09 45 | 4e 44 50 0d 09 09 09 09 |er.....E|NDP.....|
|00003170| 0d 0d 0d 0d 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |....****|********|
|00003180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003190| 2a 2a 2a 2a 2a 2a 2a 20 | 54 53 45 43 6c 6f 73 65 |******* |TSEClose|
|000031a0| 20 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | *******|********|
|000031b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000031c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 0d 2a 20 54 68 69 |********|**.* Thi|
|000031d0| 73 20 72 6f 75 74 69 6e | 65 20 28 61 6e 64 20 61 |s routin|e (and a|
|000031e0| 6c 6c 20 6c 69 6b 65 20 | 69 74 20 62 65 6c 6f 77 |ll like |it below|
|000031f0| 29 20 70 65 72 66 6f 72 | 6d 73 20 74 68 72 65 65 |) perfor|ms three|
|00003200| 20 62 61 73 69 63 20 66 | 75 6e 63 74 69 6f 6e 73 | basic f|unctions|
|00003210| 3a 20 09 09 09 09 09 2a | 0d 2a 20 31 29 20 70 75 |: .....*|.* 1) pu|
|00003220| 73 68 69 6e 67 20 74 68 | 65 20 70 61 72 61 6d 65 |shing th|e parame|
|00003230| 74 65 72 20 62 6c 6f 63 | 6b 20 28 41 30 29 2c 20 |ter bloc|k (A0), |
|00003240| 61 6e 64 20 74 68 65 20 | 70 6f 69 6e 74 65 72 20 |and the |pointer |
|00003250| 74 6f 20 74 68 65 20 44 | 43 45 20 28 41 31 29 20 |to the D|CE (A1) |
|00003260| 6f 6e 20 74 68 65 20 73 | 74 61 63 6b 2e 2a 0d 2a |on the s|tack.*.*|
|00003270| 20 32 29 20 54 65 73 74 | 69 6e 67 20 74 6f 20 73 | 2) Test|ing to s|
|00003280| 65 65 20 77 68 65 74 68 | 65 72 20 74 68 65 20 69 |ee wheth|er the i|
|00003290| 6d 6d 65 64 69 61 74 65 | 20 62 69 74 20 77 61 73 |mmediate| bit was|
|000032a0| 20 73 65 74 20 69 6e 20 | 74 68 65 20 74 72 61 70 | set in |the trap|
|000032b0| 20 77 6f 72 64 20 61 6e | 64 20 52 54 53 69 6e 67 | word an|d RTSing|
|000032c0| 09 2a 0d 2a 20 33 29 20 | 54 65 73 74 69 6e 67 20 |.*.* 3) |Testing |
|000032d0| 74 68 65 20 72 65 73 75 | 6c 74 20 69 6e 20 44 30 |the resu|lt in D0|
|000032e0| 2e 20 20 49 66 20 69 74 | 27 73 20 31 20 74 68 65 |. If it|'s 1 the|
|000032f0| 20 6f 70 65 72 61 74 69 | 6f 6e 20 68 61 73 6e 27 | operati|on hasn'|
|00003300| 74 20 63 6f 6d 70 6c 65 | 74 65 64 20 79 65 74 2c |t comple|ted yet,|
|00003310| 20 73 6f 20 77 65 09 2a | 0d 2a 20 20 20 20 6a 75 | so we.*|.* ju|
|00003320| 73 74 20 77 61 6e 74 20 | 74 6f 20 52 54 53 2e 20 |st want |to RTS. |
|00003330| 20 49 66 20 69 74 27 73 | 20 4e 4f 54 20 31 2c 20 | If it's| NOT 1, |
|00003340| 74 68 65 6e 20 77 65 27 | 6c 6c 20 6a 75 6d 70 20 |then we'|ll jump |
|00003350| 74 68 72 6f 75 67 68 20 | 6a 49 4f 44 6f 6e 65 2e |through |jIODone.|
|00003360| 09 09 09 09 09 2a 0d 2a | 20 49 20 70 75 74 20 74 |.....*.*| I put t|
|00003370| 68 65 20 73 74 61 6e 64 | 61 72 64 20 70 72 6f 63 |he stand|ard proc|
|00003380| 65 64 75 72 65 20 68 65 | 61 64 65 72 20 69 6e 20 |edure he|ader in |
|00003390| 6a 75 73 74 20 73 6f 20 | 79 6f 75 27 64 20 73 65 |just so |you'd se|
|000033a0| 65 20 61 6e 6f 74 68 65 | 72 20 65 78 61 6d 70 6c |e anothe|r exampl|
|000033b0| 65 20 6f 66 20 69 74 20 | 69 6e 09 2a 0d 2a 20 75 |e of it |in.*.* u|
|000033c0| 73 65 2e 20 20 49 20 66 | 6f 75 6e 64 20 53 61 6d |se. I f|ound Sam|
|000033d0| 70 6c 65 2e 61 20 74 6f | 20 62 65 20 6d 6f 73 74 |ple.a to| be most|
|000033e0| 20 68 65 6c 70 66 75 6c | 20 69 6e 20 6d 75 63 68 | helpful| in much|
|000033f0| 20 6f 66 20 77 68 61 74 | 20 49 20 64 69 64 20 68 | of what| I did h|
|00003400| 65 72 65 2e 09 09 09 09 | 09 2a 0d 2a 2a 2a 2a 2a |ere.....|.*.*****|
|00003410| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003420| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003430| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003440| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003450| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003460| 0d 54 53 45 43 6c 6f 73 | 65 09 09 50 52 4f 43 09 |.TSEClos|e..PROC.|
|00003470| 09 09 45 58 50 4f 52 54 | 09 09 09 09 09 09 09 3b |..EXPORT|.......;|
|00003480| 20 61 6e 79 20 73 6f 75 | 72 63 65 20 66 69 6c 65 | any sou|rce file|
|00003490| 20 63 61 6e 20 75 73 65 | 20 74 68 69 73 20 72 6f | can use| this ro|
|000034a0| 75 74 69 6e 65 0d 0d 53 | 74 61 63 6b 46 72 61 6d |utine..S|tackFram|
|000034b0| 65 09 52 45 43 4f 52 44 | 09 09 7b 41 36 4c 69 6e |e.RECORD|..{A6Lin|
|000034c0| 6b 7d 2c 44 45 43 52 09 | 09 09 09 09 3b 20 62 75 |k},DECR.|....; bu|
|000034d0| 69 6c 64 20 61 20 73 74 | 61 63 6b 20 66 72 61 6d |ild a st|ack fram|
|000034e0| 65 20 72 65 63 6f 72 64 | 0d 52 65 73 75 6c 74 31 |e record|.Result1|
|000034f0| 09 09 44 53 2e 57 09 09 | 09 31 09 09 09 09 09 09 |..DS.W..|.1......|
|00003500| 09 09 09 3b 20 66 75 6e | 63 74 69 6f 6e 27 73 20 |...; fun|ction's |
|00003510| 72 65 73 75 6c 74 20 72 | 65 74 75 72 6e 65 64 20 |result r|eturned |
|00003520| 74 6f 20 63 61 6c 6c 65 | 72 0d 50 61 72 61 6d 42 |to calle|r.ParamB|
|00003530| 65 67 69 6e 09 45 51 55 | 09 09 09 2a 09 09 09 09 |egin.EQU|...*....|
|00003540| 09 09 09 09 09 3b 20 73 | 74 61 72 74 20 70 61 72 |.....; s|tart par|
|00003550| 61 6d 65 74 65 72 73 20 | 61 66 74 65 72 20 74 68 |ameters |after th|
|00003560| 69 73 20 70 6f 69 6e 74 | 0d 50 61 72 61 6d 53 69 |is point|.ParamSi|
|00003570| 7a 65 09 45 51 55 09 09 | 09 50 61 72 61 6d 42 65 |ze.EQU..|.ParamBe|
|00003580| 67 69 6e 2d 2a 09 09 09 | 09 09 3b 20 73 69 7a 65 |gin-*...|..; size|
|00003590| 20 6f 66 20 61 6c 6c 20 | 74 68 65 20 70 61 73 73 | of all |the pass|
|000035a0| 65 64 20 70 61 72 61 6d | 65 74 65 72 73 0d 52 65 |ed param|eters.Re|
|000035b0| 74 41 64 64 72 20 09 09 | 44 53 2e 4c 09 09 09 31 |tAddr ..|DS.L...1|
|000035c0| 09 09 09 09 09 09 09 09 | 09 3b 20 70 6c 61 63 65 |........|.; place|
|000035d0| 20 68 6f 6c 64 65 72 20 | 66 6f 72 20 72 65 74 75 | holder |for retu|
|000035e0| 72 6e 20 61 64 64 72 65 | 73 73 0d 41 36 4c 69 6e |rn addre|ss.A6Lin|
|000035f0| 6b 09 09 44 53 2e 4c 09 | 09 09 31 09 09 09 09 09 |k..DS.L.|..1.....|
|00003600| 09 09 09 09 3b 20 70 6c | 61 63 65 20 68 6f 6c 64 |....; pl|ace hold|
|00003610| 65 72 20 66 6f 72 20 41 | 36 20 6c 69 6e 6b 0d 4c |er for A|6 link.L|
|00003620| 6f 63 61 6c 53 69 7a 65 | 09 45 51 55 20 09 09 09 |ocalSize|.EQU ...|
|00003630| 2a 09 09 09 09 09 09 09 | 09 09 3b 20 73 69 7a 65 |*.......|..; size|
|00003640| 20 6f 66 20 61 6c 6c 20 | 74 68 65 20 6c 6f 63 61 | of all |the loca|
|00003650| 6c 20 76 61 72 69 61 62 | 6c 65 73 0d 09 09 09 09 |l variab|les.....|
|00003660| 45 4e 44 52 0d 0d 09 09 | 09 09 57 49 54 48 09 09 |ENDR....|..WITH..|
|00003670| 09 53 74 61 63 6b 46 72 | 61 6d 65 09 09 09 09 09 |.StackFr|ame.....|
|00003680| 09 3b 20 63 6f 76 65 72 | 20 6f 75 72 20 6c 6f 63 |.; cover| our loc|
|00003690| 61 6c 20 73 74 61 63 6b | 20 66 72 61 6d 65 0d 09 |al stack| frame..|
|000036a0| 09 09 09 4c 49 4e 4b 09 | 09 09 41 36 2c 23 4c 6f |...LINK.|..A6,#Lo|
|000036b0| 63 61 6c 53 69 7a 65 09 | 09 09 09 09 3b 20 61 6c |calSize.|....; al|
|000036c0| 6c 6f 63 61 74 65 20 6f | 75 72 20 6c 6f 63 61 6c |locate o|ur local|
|000036d0| 20 73 74 61 63 6b 20 66 | 72 61 6d 65 0d 09 09 09 | stack f|rame....|
|000036e0| 09 0d 09 09 09 09 5f 44 | 65 62 75 67 67 65 72 09 |......_D|ebugger.|
|000036f0| 09 09 09 0d 09 09 20 09 | 09 4d 4f 56 45 4d 2e 4c |...... .|.MOVEM.L|
|00003700| 20 09 09 44 31 2d 44 33 | 2f 41 30 2d 41 34 2c 2d | ..D1-D3|/A0-A4,-|
|00003710| 28 41 37 29 20 20 20 09 | 09 09 3b 53 61 76 65 20 |(A7) .|..;Save |
|00003720| 72 65 67 69 73 74 65 72 | 73 20 28 56 31 2e 31 41 |register|s (V1.1A|
|00003730| 29 0d 09 09 09 09 4d 4f | 56 45 2e 4c 09 09 41 31 |).....MO|VE.L..A1|
|00003740| 2c 2d 28 41 37 29 09 09 | 09 09 09 09 09 3b 50 75 |,-(A7)..|.....;Pu|
|00003750| 74 20 61 64 64 72 65 73 | 73 20 6f 66 20 44 43 45 |t addres|s of DCE|
|00003760| 20 6f 6e 74 6f 20 73 74 | 61 63 6b 0d 09 09 09 09 | onto st|ack.....|
|00003770| 4d 4f 56 45 2e 4c 09 09 | 41 30 2c 2d 28 41 37 29 |MOVE.L..|A0,-(A7)|
|00003780| 09 09 09 09 09 09 09 3b | 50 75 74 20 61 64 64 72 |.......;|Put addr|
|00003790| 65 73 73 20 6f 66 20 50 | 61 72 61 6d 42 6c 6f 63 |ess of P|aramBloc|
|000037a0| 6b 20 6f 6e 74 6f 20 73 | 74 61 63 6b 0d 09 09 09 |k onto s|tack....|
|000037b0| 09 4a 53 52 20 09 09 09 | 54 43 6c 6f 73 65 09 09 |.JSR ...|TClose..|
|000037c0| 09 09 09 09 3b 43 61 6c | 6c 20 6f 75 72 20 72 6f |....;Cal|l our ro|
|000037d0| 75 74 69 6e 65 2e 0d 09 | 09 09 09 41 44 44 51 2e |utine...|...ADDQ.|
|000037e0| 57 09 09 23 24 38 2c 41 | 37 09 09 09 09 09 09 09 |W..#$8,A|7.......|
|000037f0| 3b 54 61 6b 65 20 6f 66 | 66 20 41 30 20 61 6e 64 |;Take of|f A0 and|
|00003800| 20 41 31 20 77 65 20 70 | 75 73 68 65 64 2e 0d 09 | A1 we p|ushed...|
|00003810| 09 09 09 41 44 44 41 2e | 4c 09 09 23 50 61 72 61 |...ADDA.|L..#Para|
|00003820| 6d 53 69 7a 65 2c 53 50 | 09 09 09 09 09 3b 73 74 |mSize,SP|.....;st|
|00003830| 72 69 70 20 61 6c 6c 20 | 6f 66 20 74 68 65 20 63 |rip all |of the c|
|00003840| 61 6c 6c 65 72 27 73 20 | 70 61 72 61 6d 65 74 65 |aller's |paramete|
|00003850| 72 73 0d 09 09 09 09 4d | 4f 56 45 4d 2e 4c 20 09 |rs.....M|OVEM.L .|
|00003860| 09 28 41 37 29 2b 2c 44 | 31 2d 44 33 2f 41 30 2d |.(A7)+,D|1-D3/A0-|
|00003870| 41 34 20 20 20 20 09 09 | 3b 52 65 73 74 6f 72 65 |A4 ..|;Restore|
|00003880| 20 72 65 67 69 73 74 65 | 72 73 20 28 56 31 2e 31 | registe|rs (V1.1|
|00003890| 41 29 0d 09 09 09 09 53 | 57 41 50 09 09 09 44 30 |A).....S|WAP...D0|
|000038a0| 09 09 09 09 09 09 09 09 | 09 3b 53 61 76 65 20 72 |........|.;Save r|
|000038b0| 65 73 75 6c 74 20 69 6e | 20 4d 6f 73 74 53 69 67 |esult in| MostSig|
|000038c0| 20 57 6f 72 64 0d 09 09 | 09 09 4d 4f 56 45 2e 57 | Word...|..MOVE.W|
|000038d0| 09 09 69 6f 54 72 61 70 | 28 41 30 29 2c 44 30 09 |..ioTrap|(A0),D0.|
|000038e0| 09 09 09 09 3b 6d 6f 76 | 65 20 69 6f 54 72 61 70 |....;mov|e ioTrap|
|000038f0| 20 69 6e 74 6f 20 72 65 | 67 69 73 74 65 72 20 73 | into re|gister s|
|00003900| 6f 20 77 65 20 63 61 6e | 20 74 65 73 74 0d 09 09 |o we can| test...|
|00003910| 09 09 53 57 41 50 09 09 | 09 44 30 09 09 09 09 09 |..SWAP..|.D0.....|
|00003920| 09 09 09 09 3b 42 61 63 | 6b 20 61 67 61 69 6e 0d |....;Bac|k again.|
|00003930| 09 09 09 09 42 54 53 54 | 09 09 09 23 28 6e 6f 51 |....BTST|...#(noQ|
|00003940| 75 65 75 65 42 69 74 2b | 31 36 29 2c 20 44 30 09 |ueueBit+|16), D0.|
|00003950| 09 09 3b 54 65 73 74 20 | 74 68 65 20 62 69 74 2e |..;Test |the bit.|
|00003960| 0d 09 09 09 09 42 4e 45 | 2e 53 09 09 09 43 6c 6f |.....BNE|.S...Clo|
|00003970| 73 65 52 54 53 09 09 09 | 09 09 09 09 3b 49 66 20 |seRTS...|....;If |
|00003980| 5a 20 3d 20 30 2c 20 74 | 68 65 6e 20 6e 6f 51 75 |Z = 0, t|hen noQu|
|00003990| 65 75 65 42 69 74 20 73 | 65 74 20 2d 2d 20 62 72 |eueBit s|et -- br|
|000039a0| 61 6e 63 68 0d 0d 09 09 | 09 09 43 4d 50 2e 57 09 |anch....|..CMP.W.|
|000039b0| 09 09 23 24 31 2c 44 30 | 09 09 09 09 09 09 09 3b |..#$1,D0|.......;|
|000039c0| 43 6f 6d 70 61 72 65 20 | 72 65 73 75 6c 74 20 77 |Compare |result w|
|000039d0| 69 74 68 20 31 0d 09 09 | 09 09 42 45 51 2e 53 09 |ith 1...|..BEQ.S.|
|000039e0| 09 09 43 6c 6f 73 65 52 | 54 53 09 09 09 09 09 09 |..CloseR|TS......|
|000039f0| 09 3b 4e 6f 74 20 65 71 | 75 61 6c 20 74 6f 20 7a |.;Not eq|ual to z|
|00003a00| 65 72 6f 20 73 6f 20 52 | 54 53 2e 0d 09 09 09 09 |ero so R|TS......|
|00003a10| 55 4e 4c 4b 09 09 09 41 | 36 09 09 09 09 09 09 09 |UNLK...A|6.......|
|00003a20| 09 09 3b 64 65 73 74 72 | 6f 79 20 74 68 65 20 6c |..;destr|oy the l|
|00003a30| 69 6e 6b 0d 09 09 09 09 | 4d 4f 56 45 2e 4c 09 09 |ink.....|MOVE.L..|
|00003a40| 6a 49 4f 44 6f 6e 65 2c | 2d 28 41 37 29 09 09 09 |jIODone,|-(A7)...|
|00003a50| 09 09 3b 50 75 74 20 6a | 49 4f 44 6f 6e 65 20 6f |..;Put j|IODone o|
|00003a60| 6e 20 74 68 65 20 73 74 | 61 63 6b 0d 09 09 09 09 |n the st|ack.....|
|00003a70| 52 54 53 09 09 09 09 09 | 09 09 09 09 09 09 09 3b |RTS.....|.......;|
|00003a80| 72 65 74 75 72 6e 20 74 | 6f 20 74 68 65 20 63 61 |return t|o the ca|
|00003a90| 6c 6c 65 72 0d 09 09 09 | 09 0d 43 6c 6f 73 65 52 |ller....|..CloseR|
|00003aa0| 54 53 09 09 55 4e 4c 4b | 09 09 09 41 36 09 09 09 |TS..UNLK|...A6...|
|00003ab0| 09 09 09 09 09 09 3b 64 | 65 73 74 72 6f 79 20 74 |......;d|estroy t|
|00003ac0| 68 65 20 6c 69 6e 6b 0d | 09 09 09 09 52 54 53 09 |he link.|....RTS.|
|00003ad0| 09 09 09 09 09 09 09 09 | 09 09 09 3b 72 65 74 75 |........|...;retu|
|00003ae0| 72 6e 20 74 6f 20 74 68 | 65 20 63 61 6c 6c 65 72 |rn to th|e caller|
|00003af0| 0d 09 09 09 09 44 62 67 | 49 6e 66 6f 09 09 54 53 |.....Dbg|Info..TS|
|00003b00| 45 43 6c 6f 73 65 09 09 | 09 09 09 09 09 3b 74 68 |EClose..|.....;th|
|00003b10| 69 73 20 6e 61 6d 65 20 | 77 69 6c 6c 20 61 70 70 |is name |will app|
|00003b20| 65 61 72 20 69 6e 20 74 | 68 65 20 64 65 62 75 67 |ear in t|he debug|
|00003b30| 67 65 72 0d 09 09 09 09 | 45 4e 44 50 0d 09 09 09 |ger.....|ENDP....|
|00003b40| 09 0d 09 09 09 09 45 4e | 44 00 00 00 00 00 00 00 |......EN|D.......|
|00003b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b80| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00003b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bb0| 0c 44 72 69 76 65 72 47 | 6c 75 65 2e 61 21 02 00 |.DriverG|lue.a!..|
|00003bc0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 00 00 |..TEXTMP|S ......|
|00003bd0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 00 00 |..TEXTMP|S ......|
|00003be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bf0| 00 00 a2 26 f3 2e 00 00 | 3a c9 00 00 01 ac 00 00 |...&....|:.......|
|00003c00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 dd 00 03 |...H..Mo|naco....|
|00003c90| 01 dd 02 7d 00 00 00 00 | 00 00 00 00 00 00 00 00 |...}....|........|
|00003ca0| 00 00 00 00 00 00 00 06 | 00 03 00 78 00 18 02 6d |........|...x...m|
|00003cb0| 02 fd 00 78 00 18 02 6d | 02 fd a4 aa 0f f6 00 00 |...x...m|........|
|00003cc0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|00003cd0| 00 78 00 18 02 6d 02 fd | 00 78 00 18 02 6d 02 fd |.x...m..|.x...m..|
|00003ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cf0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 58 |.....n..|.n...>.X|
|00003d00| 55 4c 0b 64 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |UL.d....|.>..MPSR|
|00003d10| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00003d20| 03 f0 ff ff 00 00 00 4c | 00 5e 52 9c 00 00 00 00 |.......L|.^R.....|
|00003d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+